+ 2

Can someone tell me why my code shown "Error"

This is the prime number program But while i am compile my code it shown error. Can anyone correct them. https://code.sololearn.com/cwj7BDSeDWTz/?ref=app https://code.sololearn.com/cwj7BDSeDWTz/?ref=app

26th Sep 2018, 6:11 PM
Sitesh
Sitesh - avatar
3 Respuestas
+ 7
I think it's because you didn't use spaces for indentation because it worked well when I removed them
26th Sep 2018, 7:07 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 3
On line 15 change your condition i <= num to i < num Secondly, add break statement after line 23 (after incrementing p)
27th Sep 2018, 3:48 AM
blACk sh4d0w
blACk sh4d0w - avatar
+ 3
Thanks for the suggestions :) Mert Yazıcı Ina nAutAxH AhmAd
27th Sep 2018, 1:29 PM
Sitesh
Sitesh - avatar