repl.it
@mickekring/

Testar tal i ett intervall - delbarhet

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
#testar vilket/vilka tal i ett intervall som är jämt delbara med alla tal mellan 2-16

for n in range(10000000):
  if n%2 == 0 and n%3 == 0 and n%4 == 0 and n%5 == 0 and n%6 == 0 and n%7 == 0 and n%8 == 0 and n%9 == 0 and n%10 == 0 and n%11 == 0 and n%12 == 0 and n%13 == 0 and n%14 == 0 and n%15 == 0 and n%16 == 0:
    print(n)
?