C Program to Print First 10 Natural Numbers in Reverse

Write a C program to print first 10 natural numbers in reverse order using for loop.

#include <stdio.h>

int main()
{
	printf("The First 10 Natural Numbers in Reverse\n");

	for (int i = 10; i >= 1; i--)
	{
		printf("%d\n", i);
	}
}
C Program to Print First 10 Natural Numbers in Reverse

This C program displays the first 10 natural numbers in reverse or descending order using a while loop.

#include <stdio.h>

int main()
{
	int i = 10;

	printf("The First 10 Natural Numbers in Reverse\n");
	while (i >= 1)
	{
		printf("%d\n", i);
		i--;
	}
}
The First 10 Natural Numbers in Reverse
10
9
8
7
6
5
4
3
2
1

This C program uses the do while loop to print the first 10 natural numbers in reverse or descending order.

#include <stdio.h>

int main()
{
	int i = 10;

	printf("The First 10 Natural Numbers in Reverse\n");

	do
	{
		printf("%d\n", i);

	} while (--i >= 1);
}
The First 10 Natural Numbers in Reverse
10
9
8
7
6
5
4
3
2
1

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.