 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can print this pattern in C programming. Before starting, you can note my information. You can follow or subscribe my YouTube channel that is Sanjay Gupta enters code tech school. You can download my Android app that is available on Google Play. Name is Techimus. Now you can see I have included a header file stdr.h. Then in main function, three variables are declared i, j, n. One more variable I am declaring that is k and I have initialized it with one. Then printf scanner will read number of rows. Now for rows, I am implementing first loop starting from one and it will repeat n times. Inside this loop, I am implementing another loop which is also starting from one and this will repeat i times. Inside this loop, I am implementing printf and I am printing k. Just after printing it, I am increasing value of k by one. After completion of this j loop for line change, I am implementing printf and slash n. So this way, this complete program will print the above mentioned pattern on console. So first I am executing this code. Then I will be explaining. Sorry, I have not used semicolon here. Now again, I am executing it. It is asking for number of rows. You can see the output 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 are printed on console. But these are not printing in space format. So to apply spaces, I am adding space just after percent d. So I have applied two spaces. So you can see this output is printed now. So this time it is printing with a particular space. So if you want to reduce space, so this time printf is containing only one space. So again, you can see the output. So accordingly you can print the values on console. But you can see all the digits are printing in continuous format like 1, 2, 3, 4, 5, 6 and so on. So this has happened with the help of this k variable. So k is initialized by one and it is incremented inside this nested loop. So whenever k will be printing, its incremented value will be displayed on console. Now if you want to reduce this k++ statement from this nested loop, you can apply it here also in printf statement. So this is post increment. So first value of k will be displayed on console and then it will be incremented by 1. So you can see it will display the same output as it is displayed earlier. So 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 are displayed on console. So this way you can implement this pattern with the help of this code in C programming. I hope you have understood how you can display this pattern. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel that is Sanjay Gupta underscore Tech School. Thank you for watching this video.