C Program to Print First n Natural Number in Reverse Order using For Loop

C Program to Print First n Natural Number in Reverse Order using For Loop

Write a Program to Print First n Natural Number in Reverse Order using For Loop

// C Program to Print First n Natural Number in Reverse Order using For Loop

#include <stdio.h>

int main()
{
	int n, i;

	printf("Enter the number :--> ");
	scanf("%d", &n);

	printf("\nFirst %d Numbers in Reverse :--> ", n);
	for(i=n; i>0; i--)
	{
		printf("%d ", i);
	}
        return 0;
}

Output:

Enter the number :--> 10

First 10 Numbers in Reverse :--> 10 9 8 7 6 5 4 3 2 1