 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can display these patterns in C programming. Before starting, you can note my information. You can follow my YouTube channel that is sanjaygupta underscore tech school. You can download my Android app that is tech image available on Google Play. Here you can see I have included a header file that is stdr.h. Inside main four variables i, j, n, n, k are declared. K is initialized by one. Then printf will display enter how many rows you want to print message on console. Then number of rows will be received by this n variable. Now first loop is starting from one and it is ending to n. So this loop will repeat n times and it will display number of rows. Then for columns j loop is started inside i loop. It is repeating i times starting from one to i and it is printing value of k on console and just after printing of k, k is incremented by one. So with the help of this loop, first pattern will be displayed on console. You can see the output. If you want to arrange it in proper format, you can apply here percent 2d. So this 2 represents field width. So each digit will be occupying two fields on console. So you can see now it is printing in proper format. Now if you want to print this pattern on console in reverse form, so you have to change first loop only. You have to initialize it by n. Its condition will be i greater than equals to one and i minus minus. So this time suppose n is five. So i will be receiving five. So j loop in first go will be repeating five times. So one two three four five will be displayed on console and rest of the things will remain same. So again I am executing this code. You can see the output. One two three four five in first row six seven eight nine second row ten eleven twelve thirteen fourteen and fifteen and you can see it is printing in proper format because I have used percent 2d notation in print f. So friends this way with the help of k plus plus you can print digits in a continuous order and by changing in first loop that is representing rows you can display above reverse pattern on console. So I hope you have understood how you can print both the patterns in c programming with the help of nested loops. If you want to watch more programming related videos you can subscribe my youtube channel that is sanjaygupta underscore tech school. Thank you for watching this video.