source file name: While1.C

void main()

{

int n;

clrscr();

printf(" To display numbers 1 to to 10: ");

n=1;       // start

while(n<=10)      // end

{

printf("\n  %d ",n);    // body

n++;      // interval

}

getch();

}

output: