+ 1
How to print prime numbers inside C++ As it were 1, 3,5,7,11,13,...... 97 till..
Loop
5 odpowiedzi
+ 4
BTW, '1' is not a prime.
https://code.sololearn.com/csfKIN7iPP0R/?ref=app
Max : You're free to link a code that gives a more optimum solution to the problem 😃
Thanks for reminding :p
https://code.sololearn.com/c3UjQTEiDtZ6/?ref=app
+ 3
@Rahul George You only need to check up to sqrt(I)
+ 3
@Rahul George this is as far as i am willing to take it right now https://code.sololearn.com/cm9DhrqT053l/?ref=app
+ 2
use the modulo operator in a loop.
+ 1
Just and only prime numbers such as 1,3,5,7,11,13,17,21,23,27,31,33,37,41,.....till..97