C Program Natural Numbers One to Ten

By | March 7, 2020

What are Natural Numbers?

The natural numbers (i.e. counting numbers) are numbers which are used for counting and ordering. They can be expressed mathematically as: ℕ = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … } .

Some mathematicians consider 0 to be a natural number.

C Source Code Natural Numbers from One To Ten Display

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

Output

Numbers from 1 to 10 are:
1
2
3
4
5
6
7
8
9
10

 

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *