Print numbers from 1 Upto n using loop

#include<stdio.h>
#include<conio.h>
int main()
{
int i=1,n;
clrscr();
printf("Enter n : ");
scanf("%d",&n);
while(i<=n)
{
printf("%d\t",i);
i++;
}
getch();
return 0;
}

0 comments:

Post a Comment