+ 1
6th Jul 2019, 9:21 AM
Kajal Rao
Kajal Rao - avatar
2 ответов
+ 3
Here is another example. You just need to iterate until the square root of the input number https://code.sololearn.com/crZkkz38H2Ts/?ref=app
6th Jul 2019, 9:54 AM
Seniru
Seniru - avatar
+ 1
Not really. That's not the definition of a prime number, and you don't really need an else statement. Here's the fixed code: https://code.sololearn.com/clzXZZNnMOta/?ref=app
6th Jul 2019, 9:34 AM
Airree
Airree - avatar