diff --git a/patterns/rev_number_pyramid.c b/patterns/rev_number_pyramid.c new file mode 100644 index 0000000..15c00f0 --- /dev/null +++ b/patterns/rev_number_pyramid.c @@ -0,0 +1,27 @@ +/* +Enter the number of rows: 6 +123456 +12345 +1234 +123 +12 +1 + +*/ +#include +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"); + } +}