+ 1

What is happening in this code?

IN SHORT: why we are using p in this code IN DETAIL: In for loop why we are using "P && ". After for loop why we had use p=o. https://code.sololearn.com/csutCRb3WE4U/?ref=app

28th Mar 2019, 6:42 AM
Abhishek Dimri
Abhishek Dimri - avatar
1 Answer
+ 5
Abhishek Dimri I figured out your error. You didn't declare an "else" Statement incase the number inserted is not a prime number. Here's the correction... https://code.sololearn.com/cyURfzzTdpJy/?ref=app
28th Mar 2019, 7:01 AM
Jella
Jella - avatar