Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions patterns/rev_number_pyramid.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Enter the number of rows: 6
123456
12345
1234
123
12
1

*/
#include<stdio.h>
void main()
{
int a,b,rows;
printf("Enter the number of rows: ");
scanf("%d", &rows);
for(a=rows;a>0;a--)
{
for(b=1;b<=a;b++)
{
printf("%d",b);


}
printf("\n");
}
}