No. 1 - Write a program that will ask the user to enter a number n and display all the numbers from 1 to n on a single line.
#include"stdio.h"
main()
{
int x,n;
clrscr();
printf("If n=");
scanf("%d",&n);
for(x=1;x<=n;x++)
printf("%d",x);
getch();
}
note: the "" in stdio.h is a <>
For download, please follow the link below:
http://rapidshare.com/files/8113343/THERESE.EXE.html
No comments:
Post a Comment