 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print the triangle which is available in front of you with the help of C code. Before starting, you can note my information. You can follow my YouTube channel that is sanjaygupta underscore tax school. You can download my app, Techimage that is available on Google Play. It contains various programming related material. Now I am going to implement some instructions in C so that you can learn how we can print above commented pattern on console. So first I am including a header file that is stdio.h then inside main function I will be implementing some instructions. So I am declaring two variables i and j and third variable is n. Now using printf I am asking from the user how many rows you want to print. The entered value will be received by this scan of statement inside n variable. So n is containing number of rows which will be displayed on console. Now I am implementing nested loop formation. So first loop starting from 1 it will repeat n times. This is outer loop which is starting from 1 and repeating n number of times. Inside this loop I am implementing another loop which will start from 1 but it will repeat i times. Inside this loop I am implementing printf. Inside printf I am mentioning asterisk with a space. After completion of j loop I am implementing another printf which will implement new line on console. So this is the complete code which is available in front of you which will display above mentioned pattern on console. So i loop will start from 1 then condition will be checked which is based on n. If condition is true then control will be transferred to j loop. j is starting from 1 and first time value of i will be 1. So first time this j loop will repeat one time. So single star will be displayed on console. After termination of j loop control will be transferred to printf slash n. So new line will be displayed on console then i plus plus will be performed. So value of i becomes 2. Again this condition will be checked. If condition is true then control will be transferred to j loop. j is starting from 1 and i is 2. So this time this loop will repeat 2 times. So 2 stars will be displayed on console. After completion of j loop again new line will be displayed on console. So this way these 2 loops will be executed and above mentioned pattern will be displayed on console. Now i am going to execute this code. You can see it is asking for number of rows. I am entering 6. You can see 6 rows are displayed on console and it is making the pattern which we want to draw on console. So this way i have implemented this left aligned triangle of stars on console with the help of nested loop. You can also implement this code in your laptop or desktop so that you can understand how you can display this kind of triangle. I hope you have understood the concept. If you want to watch more programming related videos you can follow my youtube channel that is sanjaygupta underscore tech school. Thank you for watching this video.