The next major topic, and this is one that fascinates a lot of people, is to write programs that are recursive. So we'll look at very elementary program that does it this way. Then later in some further segments, we will very much make use of the technique and show you actual code and why you want to write code frequently recursively. So the big thing about computation, what we know is, well, it's really useful. It's really useful when you do lots of things over and over again, big things. That's why iteration is so powerful. That's why we've paid a lot of attention to statements like the for statement and the while statement, they're very useful. They're going to be even more useful when we come to our next big topic which is going to be using them in relation to arrays and very large amounts of data. So we've seen how to do things repeatedly with iteration, I'm going to show you a simple example of doing that, and then I'm going to show you how the exact same thing can be done recursively. First off, in the iteration, we're going to write this little NASA program, little Cape Kennedy thing, where we have a countdown. We're going to side that we need a count down from whatever, some integer for example, it could be 10. Here's how we might do it iteratively. So you might say while n greater than zero, printf time is, we print for example if it starts with 10 as 10, then we'd auto decrement. Then we'd keep printing that, so we do 10, 9, 8, 7, 6. The last value we print is one because after one it goes to zero. Then before we exit to routine, we print blastoff. That's really easy. We should be comfortable with doing that, we've already done a number of iterations. Now let's do this recursively. Is about the simplest recursion I can think of. We're going to call this routine void recursive countdown. Again, is going to have this integer n, and may again start at 10. In the recursive case, we have a test to see if we're what we're going to call the base case. So if we're at the base case, n equals zero and we're going to print blastoff. If we're not at the base case, then we have to do the recursion. We do an else, printf time is, whatever n was for example starting at 10, and then we call the function again, the same name function, but now we call it at one less. We're going to keep on doing that. The recursion is going to keep printing this, is going to do the else part until it reaches a value of zero, called with a value of zero. So it happens repeatedly. You have, as a key idea, a base case, in this case blastoff at n equals zero, and then you have a general case or the recursive case. The recursive case you're doing a print of the time, you're counting one less that's ensuring that it will terminate, and you're done with understanding the most elementary of recursions. If you've had some mathematics, if you're on the mathematical side of things, you'll recognize that recursion is very similar to mathematical induction. One of the nice things about doing things recursively is they may be easier to debug or in effect prove correct. They may be obviously correct. As I say in the next video, we're going to show some interesting, again simple, but recursive programs.