 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print these two patterns using C programming. Before starting, you can note my information. You can follow or subscribe my YouTube channel that is sanjaygupta underscore tech school. You can download my app tech emis, which is available on Google Play. Here you can see I have implemented a code in main function three variables of integer type is declared then character variable CH is available. Printed will display and enter how many rows you want to print masses. Then scanner will read the value inside n variable. Then first loop which is I starting from one condition is I less than equals to n. This loop will repeat n times. This is for printing rows. Then before starting another loop that is J, which will repeat I times I have initialized CH with a because every time this row is starting from a. So inside J loop printer will print value of CH and just after printing CH it will increase by one. So every time this loop will begin from a and then it will print a b c depending on the rotations of J loop after completion of J new line will be displayed using slash n and then this way repetitions will be applied. So by this code first pattern will be displayed on console as you can see the output. Now if you want to print its reverse then you have to change only first loop. So instead of I equals to one you have to use I equals to n then I greater than equals to one and I minus minus. So this way suppose n is five. So I will be initialized by five. So J loop will repeat five times in first rotation then new line and then I minus minus will be performed. So this time I will I will become four. So J loop will repeat four times. So J is dependent upon the value of I. That's why this is happening. Now I am executing this code. You can see the output. Reverse pattern is displayed on console. So I hope you have understood how you can print these two patterns on console with the help of nested loop in C programming. If you want to watch more programming related videos you can subscribe or follow my YouTube channel that is Sajya Gupta underscore tech school. Thank you for watching this video.