C Program to print Inverted Right angled Triangle in a pyramid star pattern Type 1

Program

#include<stdio.h>
void main()
{
	int i, j, n;
	printf("Enter number of rows of stars to print\n");
	scanf("%d", &n);
	for(i = n; i >= 1; i--)
	{
		for(j = 1; j <= i; j++)
		{
			printf("*");
		}
		printf("\n");
	}
}

Output

Enter number of rows of stars to print
5
*****
****
***
**
*