All articles
c

A program to print natural numbers between 1 and 10 in reverse order

Share this article

Share on LinkedIn Share on X (formerly Twitter)

C Programming Language 037

The following code shows how to write a program to print natural numbers between 1 and 10 in reverse order.

Program

#include <stdio.h>
 
void main()
{
    int i;
 
    for (i = 10; i >= 1; i--)
    {
        printf("%d\n", i);
    }
 
    printf("\n");
}

Result

10
9
8
7
6
5
4
3
2
1

Comments