C Program To Print Natural Number Up To Which User Asked | C Programming

include<stdio.h> 
int main()
{int i=1,n; printf("Enter the number up to which you want to display.");
scanf("%d",&amp;n);
while (i&lt;=n)
{
printf("%d\t",i);
i++;}
return 0;
}

OUTPUT

C program to print natural number up to which user asked.
Share To:

Arogya Thapa Magar

Post A Comment:

0 comments so far,add yours