0

What do i have to do here?

https://code.sololearn.com/cw5RAUedVX14/?ref=app It does print a text if it's not prime number. If it is one, it just doesnt output.(If i would normally cout, it would print the text in there multiple times.)

17th Jul 2017, 12:20 PM
Hakan Koca
Hakan Koca - avatar
2 Réponses
+ 5
repeat what you did for not a prime number. remember the break;
17th Jul 2017, 12:56 PM
jay
jay - avatar
0
Try declaring "prime" outside the for loop, set it to "true" and check it after the for loop.
17th Jul 2017, 12:49 PM
Alexi