source file name: display10.C

 #include<stdio.h>

int  main()

{

int n;

//clrscr();

printf("numbers 1 to 10 :\n "); 

for (n=1;n<=10;n++)

{

printf("%d\t  ",n);

}

//getch();

return 0;

}

 

Output:

numbers 1 to 10:

1 2 3 4 5 6 7 8 9 10