C program to print natural numbers in reverse from n to 1 using while Loop
#include<stdio.h>
int main()
{
int n;
/* Input limit from User */
printf("Enter any Number: ");
scanf("%d",&n);
/* Run loop from n to 1 and
decrement 1 in each iteration */
while(n >= 1)
{
printf("%d\n",n);
n--;
}
return 0;
}
Output
Enter any Number: 13
13
12
11
10
9
8
7
6
5
4
3
2
1