Right Triangle Pattern in C

A simple C program to print a right triangle pattern by using stars. There are various types of patterns. But i will be uploading the important patterns that will help you out.

#include<stdio.h>
#include<conio.h>
main()
{
clrscr();

for (int i=1;i<=5;i++)
{
for (int j=1;j<=i;j++)
{
printf(“*”) ;
}
printf(“\n”);
}
getch();

}

Output:

Star pyramid in C

Leave a Reply