[MUSIC] Okay, let's take some of the ideas we've already been discussing with functions and use them again more practice. You should practice on your own. And this example, we're going to try to print a table of squares and cubes, and we're going to use some simple functions just again to structure the code properly. And we're also of course going to use the standard I/O functions from standard io.h, where will also get prototypes or function declarations. So here, we have what we just discussed about prototype, we didn't need to include the name of the parameter, we need the type of the parameter. So, we know from the point of view of main which is going to use this, it understands the needs to call a function whose name is square, which returns a double and which computes a double. That's all that needs to understand how to compile that as long as it can find the definition of square at later point either in the same file or brought in from some outside file. We'll learn later how to include our own coding files. For example, here's main, here is where main is going to make use of square and cube. And you notice we have a nested for statement. Let's look at that briefly just to remind you of why a computer can be so powerful it gets you to do a lot of computations trivially, just a little bit of writing. So here we're going to say from 1 to how_many, that's how long the table is going to be. And we're going to want to write out cubes and squares and intervals of 0.1. So we're going to say, we're going to ask about square and cubes by interval of 0.1. We're going to ask for n. So we will have a table from 1 to whatever n is 0.9 and print out the squares in the cubes. So this is the outer loop, this is the inner loop, we're doing it in tens if we want to do it in hundredths, with this would be a 100. So again, very simple structure, but very powerful we get this double loop and we're going to print where the evaluation occurs and the square and the cube. And of course, this could be extended if we had other things we wanted to compute for that number. And then, go down to the end of the file. And here's the actual definitions. So at the front these things were, Prototypes but no definition yet. Here's the definition. So now the compiler knows that's how I define this function called square. Let's go and run it. I want square and cube for 1 to n. Let's just do 2. You can see I get a nice table 1, 1 squared is 1. 1 cubed is 1. 1.5, 1.5 squared is 2.25, cubed is 3.375. And here's the square and cube of 2. So it's good for computer scientist to know everything about powers of 2. So that's 2 4 8. What would be next if we was raised to the 4th power would be 16, to the 5th power would be 32. And here we're all the way up to 2.9. Okay, so that shows you how the standard program we would package it, divide and conquer right our individual routines to clear them before you use them and then have their definitions. Either style by the way, it's okay. We could have as a style the declaration and definition in front of name if appropriate. [MUSIC]