How to read an one dimensional array and search which elments was prime or not prime? Thenks for answering :) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to read an one dimensional array and search which elments was prime or not prime? Thenks for answering :)

24th Dec 2016, 2:50 PM
Faroug AS Hashad
Faroug AS Hashad - avatar
2 Answers
+ 1
To test if a number is prime you assume that is divisible only by 1 and itself. Please take a look to my code: https://code.sololearn.com/c8gjJwr0o455/?ref=app
25th Dec 2016, 12:20 AM
Michael Isac Girardi
Michael Isac Girardi - avatar
+ 1
thanks for helping
25th Dec 2016, 5:40 AM
Faroug AS Hashad
Faroug AS Hashad - avatar