OK, now let's move ahead now.
We will do a very small modification in this program to get a very different output.
OK, here you can see I have written printing squares given no.
So to print square still given.
No, we need to first understand what is the square.
For example, we have a number to the square will be two in two to the number multiplied by itself.
Two times is a square for three.
It will be three in two three.
Right.
You understood this.
So for any number, the square will be that number multiplied by itself.
So for a number and what the square end in to end.
Right.
So if we want to print squares, where do we need to change the program?
We have to change this statement, the print statement.
And what we have to change is we have to just change here and write AI into AI because we will be printing
same number multiplied by itself.
OK, so if you do this more change in the program, the whole output will change.
OK, let's run this.
So is asking for a no delivery to print all the squares, see, for one, the square is one because
one, two, one is one, then 22 is four, three, two, three is nine and 14 to 14, 16.
So it is printing all the squares till four.
OK, isn't it interesting.
So this was all about squares.
Now if you want to print cubes.
What is a cube, so for you, the same number is to be multiplied by three times with itself to into
two, into two is a cube.
Similarly, if for three is three, into three, into three is a cube.
OK, so what do we do here?
We will just change this and we will write a.
So if you multiply it three times then it will result into a cube.
OK, now if you run this program.
Safety under fire.
It is printing all the number five, Cubavision, is one you move to.
Is it doing to two into two, two into two is four four and two is eight.
So till five, it is building cubes of all the numbers.
OK, so you can not play around with this program.
You can try some more modifications in the program and we'll see in the next lecture.
Thank you.