Saturday, 10 December 2011

Write a program to print ten numbers by user in c

#include
#include
main()
{
int i,n;
clrscr();
printf("Enter The No.:-");
scanf("%d",&n);
for(i=1;i<=n;i++)
printf("%d",i);
getch();
}

OUTPUT
Enter The No.:10
1 2 3 4 5 6 7 8 9 10

No comments:

Post a Comment