Advertisement
informaticage

Elenco divisori nella lista

Feb 9th, 2021
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. lista = []
  2.  
  3. n = int(input("Inserire N: "))
  4.  
  5. for k in range(1, n):
  6. if(n % k == 0):
  7. lista.append(k)
  8.  
  9. print("I divisori di %d sono" % n)
  10. print(lista)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement