+ 1

Hey ya guys.. can someone explain this code to me..?

It's a code that displays the perfect numbers between 1 and 500... And the p = 1 and p++ what that for? https://code.sololearn.com/cM8UkyI6LOLk/?ref=app https://code.sololearn.com/cM8UkyI6LOLk/?ref=app

23rd Nov 2019, 6:26 PM
M.Gavili
M.Gavili - avatar
2 Antworten
+ 1
P=1 is to reset the counter each time you iterate through i P++ is to a post increment for the while loop Not sure if that helped but hope i did
23rd Nov 2019, 6:42 PM
M . Q
M . Q - avatar
+ 1
Thanks that helped.. :))))
23rd Nov 2019, 7:09 PM
M.Gavili
M.Gavili - avatar