 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can display these two patterns in C programming. Before starting, you can note my details. You can subscribe my YouTube channel that is Sanjay Gupta underscore tech school. You can download my Android app based on programming that is Techimace available on Google Play. Here you can see I have implemented a code which will display first pattern that is A, then in second row 2 times B, in third row 3 times C and so on. So here you can see I have initialized a variable CH with A, then n will read number of rows, then first loop which is repeating n times starting from 1 to ending to n. Inside this loop, I have implemented another loop which is repeating i times. So if value of i is 1, then this loop will repeat 1 time. If value of i is 2, then j loop will repeat 2 times and according to the rotation of j, value of CH will be displayed on console and after termination of j loop slash n will be displayed on console that is new line and CH will be incremented by 1. So first time CH will print A because this j loop will repeat 1 time only. After termination of j loop, CH plus plus will make value of CH B. So next time when i will be 2, then j loop will repeat 2 times. So 2 times B will be displayed on console. So now I am executing this code. I have entered 5 as number of rows so you can see 5 rows are displayed. Now if you want to print this pattern in reverse order, so first you have to change this first loop that is i equals to n then i equals to 1 and then i minus minus. In first loop that is representing number of rows the above reverse pattern will be displayed on console. Again I am entering 5. You can see the output A is printed 5 times, B 4 times, C 3 times and so on. Why so? Because suppose n is 5, so i is initialized with 5. So this time first time j loop will repeat 5 times. So value of CH will print 5 times that is A. So A will be printed 5 times. After termination of j, CH will become B then i minus minus will make i 4. So second time j will repeat 4 times. So 4 times B will be displayed on console and so on. All the values will be displayed on console. So I hope you have understood how you can print both the patterns using C programming and nested loops. If you want to watch more programming related videos, you can subscribe or follow my YouTube channel that is sanjay gupta underscore tech school. Thank you for watching this video.