 Hello friends. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech Schools. In this video, I'm going to explain how you can get series of square and cubes of natural numbers in C programming. So here you can see for series is having one square, two square, three square, four square and so on. And the second is one cube, two cube, three cube and four cube and so on. So first I will be implementing this series and then I will tell you how easily you can convert this into this second one. And before starting, I want to share one information. If you go to detail or description of this video, you will find links of various pages. Those are related to various programs. So you can watch them too. So now coming on to this first time going to implement this series related program. So main function when I'm writing variable I, that variable N, so N is for reading how many terms you want to print for the scene and I will be controlling the loop. Then print as enter value of N, then scan as percent B, M percent N. So N will be having a digit that will tell how many times or how many number of visits we want to print for a particular scene. So for loop starting from one condition is I less than equals to N and I plus plus, right? So this loop will be N times. So let's say N is five. So it means we need to print five sequences of this series. So one square, two square, three square, four square, five square. One, two, three, four, five will be available with this side. So we will be using this side to print the digits. So here I am writing percent B. You can see after each digit and printing comma. So just after percent B, you can put a comma then close double quotes again put a comma. Now you can write I into I. You can write I into I. So I will be having first time one, so one into one will be printed. Then I will be implemented to two. So next time two into two will be printed. Then I will become three. So three into three will be printed. So this way we are multiplying natural number by itself so that we can have squares of each natural. And this loop will be N times. So N digits will be printed as. Then you can close this loop. So this way I hope you understood how we can print squares of each natural number with the help of this call. Now if you want to print cubes, so you can simply convert it like this. So here you can multiply I three times. So let's say if we calculate two cube, so we need to do this. We need to multiply two three times. So here we are doing same. So whatever the value of I, it will be multiplied by multiplied three times. And the calculated result will be printed in place of percent. So this way I converted the implementation of this piece into this one. One more thing you can use here. One more thing you can use here. We have a predefined function that is known as POW. So you can use that function like this. So you can write POW then I comma three. So here this first argument is known as base and the second argument is known as power. So it means we are calculating I raise three. We are calculating I raise three. So I will become base and three will become power. If you are calculating squares or in place of three, you can pass two. So remove this and you can play this here. So output will be same. And if you are using POW, so you need to include one header file that is map dot H because this POW is available in that header file. So do implement that header file for that this program. So I hope you understood how we can implement these two series with the help of C programming. So if you want to watch more programming related videos, you can open my channel go to playlist and you can watch various programming related videos. So I hope you understood whatever I explained in this video. Thank you for watching this.