Q. Print first 10 prime numbers.
Answer =
count = 0 n = 0 for i in range(1,100) : count = 0 if n == 10 : break for j in range(2,i) : if i % j == 0 : count = 1 if count == 0 : n +=1 print(i)
Answer =
count = 0 n = 0 for i in range(1,100) : count = 0 if n == 10 : break for j in range(2,i) : if i % j == 0 : count = 1 if count == 0 : n +=1 print(i)
Thanks but not atleast
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )