0

good afternoon, I wrote the code, but the project does not count.

https://code.sololearn.com/cteGAp740K34/?ref=app

3rd Jan 2021, 8:55 AM
Dmitry
Dmitry - avatar
3 ответов
+ 3
Try this. 1. The second if statement is unnecessary. 2. Incremention should be at the last line of the while loop Update me if it is still not solved. Thanks https://code.sololearn.com/cnnw4T4qwrHy/?ref=app
3rd Jan 2021, 9:21 AM
noteve
noteve - avatar
+ 2
Dmitry Try this : while(n>0) { cout<<n<<endl; if(n%5==0) cout<<"Beep"<<endl; --n; }
3rd Jan 2021, 9:15 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 1
Thank you very much!
3rd Jan 2021, 9:39 AM
Dmitry
Dmitry - avatar