Chapter:

Pattern-Printing-in-C

C program to print following Pyramid:

*****

****

***

**

*

#include

int main()
{
	int i,j,n;
	printf("Enter the number of rows:\n");
	scanf("%d",&n);
	for(i=n-1; i>=0; i--)
	{
		for(j=0;j<=i;j++)
		{
			printf("*");
		}
		printf("\n");
	}
    return 0;
}
Show More

All Chapters

View all Chapter and number of question available From each chapter from C-programming-