countdown cpp problem | Sololearn: Learn to code for FREE!

0

countdown cpp problem

it does not go all the way it just stops. https://code.sololearn.com/cF8n0jAPuUxP/?ref=app

cpp

1/27/2021 3:11:55 PM

Evan Pangulayan

1 Answer

New Answer

+4

your *for* loop is moving forward and at the same time your value of *n* is decreasing making the loop to break in between. there are ton of ways to fix it. I just replaced the loop with a simple while loop 👇 https://code.sololearn.com/c8ihDjTk2fEe/?ref=app