Advertisement

If u input n=5, then it will be 1 2 3 4 5


#include<conio.h>
#include<stdio.h>
void main()
{clrscr();
int i,n;
printf("enter n=");
scanf("%d",&n);
for(i=1;i<=n;i++)
{printf("\n %d",i);}
getch();}

No comments:

Post a Comment

Please comment bellow. Share your knowledge