ADS

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",&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.

Post a Comment

0 Comments