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

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",&n);
while (i<=n)
{
printf("%d\t",i);
i++;}
return 0;
}

OUTPUT

C program to print natural number up to which user asked.

Post a Comment

0 Comments