Pages

Saturday, 19 May 2012

program to print ten numbers by user


45./*Write a program to print ten numbers by user*/

#include<stdio.h>
#include<conio.h>
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