WAP to check whether a number is prime or not | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 1

WAP to check whether a number is prime or not

24th Jul 2017, 2:21 PM
Adhiraj Dhar
Adhiraj Dhar - avatar
3 ответов
+ 3
It's a trending topic ^^ https://www.sololearn.com/Discuss/557787/?ref=app A JS tutorial for implementing improved prime function: https://code.sololearn.com/WPXD8LSoeiIL/?ref=app ... and one Python implementation: https://code.sololearn.com/cOdE3LoiYYkQ/?ref=app ;)
24th Jul 2017, 3:32 PM
visph
visph - avatar
0
to check prime just use two for loops .It is simple one oop for taking all numbers 2-9 if the modules of those were 0 it is prime.
24th Jul 2017, 2:27 PM
W.H.J.Hirushan
W.H.J.Hirushan - avatar
0
It's SoloLEARN, not SoloAskOtherPeopleToDoTheWorkForYou... :p
24th Jul 2017, 2:37 PM
Bogdan Sass
Bogdan Sass - avatar