Header Ads Widget

Write a program to print first 10 natural numbers in reverse order in C

Write a program to print first 10 natural numbers in reverse order in C 

write a program to print the 10 natural numbers in reverse order . Natural numbers are start from one e.g 1 ,2 ,3 ....

Sample Output:

The first 10 Natural Numbers are: 
10
9
8
7
6
5
4
3
2
1

Write a program to print first 10 natural numbers in reverse order in C 

The objective of the code is to print the 10 natural number in reverse order . 

Code(C):-

#include <stdio.h>
int main()
{
int i;
printf("The first 10 Natural Numbers are: \n");
for (i=10;i>=1;i--)
{
printf("%d \n",i);
}
return(0);
}

Output:-

The first 10 Natural Numbers in Reverse order
10
9
8
7
6
5
4
3
2
1


Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-


Post a Comment

0 Comments