APC-S-004.c (531B)
1 /* Program to print first 10 natural numbers using while loop. */ 2 3 /* 4 * Compiler Note: This source code is specifically designed for compilation 5 * and execution within the ** Turbo C ** environment. 6 * 7 * Testing Disclaimer: Due to a lack of access to the required Turbo C 8 * compiler software, this code has not been formally compiled or tested. 9 */ 10 11 #include <stdio.h> 12 #include <conio.h> 13 14 void main() 15 { 16 clrscr(); 17 int x; 18 x = 1; 19 while (x <= 10) 20 { 21 printf("%d ", x); 22 x++; 23 } 24 getch(); 25 }