In this video we're going to create a countdown.
So it's not going to count up, but it's going to count down.
And what I wanted to do is I wanted to count from 10 to 0.
And therefore, I would really like you to do it by yourself, because you should pretty much be able
to do it.
I'm going to give you a few hints if you want to try it without hints.
Pause the video now.
Okay, so first of all, we need to make sure that the counter variable is not starting at 5 or 0,
but it starts at the right number okay.
Because we want to count from ten all the way down to zero.
Secondly our comparison.
So this part here needs to be set up so that it checks whether the number is greater than zero or equal
zero.
And then finally instead of incrementing we need to decrement okay.
So these are the hints.
Now please pause the video and try it by yourself.
And I hope you did.
So I'm going to start the counter at ten.
I'm going to say counter is greater equal zero.
And I'm going to say counter minus minus.
So I'm going to decrement counter.
And if I run this now it's going to be a countdown.
So counter is ten 987654321 and zero.
And that's pretty much it.
So that's how we can create a countdown okay.
It's not countdown in the sense of it counts down the seconds because this is not a timer.
It's just a countdown.
But if you wanted to make it a timer, you would need to understand a few more things about classes
slash about the time, class, and so forth.
And that would be a little too much for this point of the course.
But that's pretty much it for this video.
So see you in the next one.