Program to print Triangle
- anitadevkar
- Mar 13, 2022
- 1 min read
Program:
#include <stdio.h>
int main()
{
int i,j;
for(i=5;i>0;i--) //for rows
{
for(j=0;j<i;j++) //for columns j loop will iterate till value of i
{
printf("*");
}
printf("\n");
}
return 0;
}
Output:
*****
****
***
**
*
Comments