 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print these two patterns in C programming. Before starting, you can note my information. You can follow or subscribe my youtube channel through this link that is youtube.com slash sanjaygupta underscore tech school. You can download my android app that is tech image which is available on google play. Now to print this first pattern. First I am writing the code to print starting 5 rows 5 4 3 2 and 1. Then I will be printing remaining 5 rows and then I will convert that code for printing this pattern. So here I have written print up scanner to read number of rows. So if number of rows will be 5 then this pattern will be printed if number of 6 sorry if number of rows will be 6 then total 12 rows will be printed here. Now I am implementing the code. I am starting i loop from n and condition is i greater than equals to 1 and i minus minus. This first loop is responsible for rows. Inside this loop I am using another loop that is j equals to 1 j less than equals to i and j plus plus. This loop is dependent upon i and it will print asterisk on console and this loop is for columns. After completion of this loop slash n will be displayed. So this way starting 5 rows will be displayed on console with this code. I am executing this code. You can see the output. Starting 5 rows are displayed here. You can compare it with this. Now I have to print remaining 5 rows. So for that purpose I just have to copy this code and I am pasting it here. Now I am changing it starting it from 1 condition is i less than equals to 1 and then i plus plus. So first loop is repeating from n to 1 and the second combination of loop is repeating from 1 to n. Now I am executing this code. You can see the output. First pattern is displayed in front of you. Here you can see this single asterisk is displayed 2 times but in this pattern it is available one time. So now I just have to convert this pattern into this pattern by removing this single asterisk sign. So for this I am starting this loop from 2. So it will not print a single star because it is printed with this above combination. So it is starting from 2. So now single asterisk will be displayed only once. You can see the output. Single star is printing one time only. Second printing of single asterisk is removed from here because second combination of loop is starting from 2. So you can see this pattern is printed on console. So friends with this code or with this C program I have displayed both the patterns on console. I hope you have understood how you can print both the patterns with the help of nested loop in C programming. If you want to watch more programming related videos you can follow my YouTube channel through this link that is youtube.com. Thank you for watching this video.