PROGRAM 11
// FILENAME: PROG11.CPP // THIS PROGRAM COUNTS BACKWARDS FROM 15 TO 1. #include #include #include #include void main () { clrscr (); char pause; int num; #include gotoxy (6, 7); cout << " PROG11.CPP"; gotoxy (48, 14); pause = getch (); window (1, 1, 80, 25); textbackground (3); clrscr (); cout << "COUNTING BACKWARDS FROM 15 TO 1\n\n"; cout.setf (ios :: showpoint); for (num = 15; num != 0; num--) { cout << setw (15) << num << "\n"; } return; } // FILENAME: COPY.H // SEE PROGRAM 7. // OUTFILE: PROG11.OUT COUNTING BACKWARDS FROM 15 TO 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
BACK TO CIS162 PAGE.