Star Pattern Series 1 - Triangle pyramid pattern in C programming language using stars
![joshua-reddekopp-syymxsdnj54-unsplash](/static/07f0d692cc8008015393d36cbd16827a/0ff54/joshua-reddekopp-syymxsdnj54-unsplash.jpg)
In This Program, We will see the Right Angle Triangle pyramid pattern or half triangle pattern in C programming language using stars.
*
**
***
****
*****
The C program for the above right angle triangle pyramid pattern or half triangle pattern is as follows:
#include<stdio.h>
int main() {
int i, j, noRows;
printf("Enter number of rows for pattern = ");
scanf("%d",&noRows);
for(i=0; i< noRows; i++) {
for(j=0;j<=i;j++) {
printf("*");
}
printf("\n");
}
return 0;
}
Output
Enter number of rows for pattern = 5
*
**
***
****
*****