Hi
I want the program to take in a number n, and then print n,n-1,n-2 till 1
the next line, it should start from n-1,n-2 till 1
then n-2,n-3 till 1
eg n=5, then
54321
4321
321
21
1
I tried but it doesnt work as I though.
any help?Code:#include<stdio.h> #include<conio.h> void main() { int n,i=0; clrscr(); printf("Enter value of N\n"); scanf("%d",n); while(n!=0) { for(i=n;i>=1;i--,n--) { printf("%d",i); printf("\n"); } } getch(); }