// Count Down.C // (c) Burt Rosenberg 1996 // This program demonstrates recursion #include void countDown(int j) { if (j == 0) { cout << "BOOM!" << endl; } else { cout << j << endl; countDown( j-1 ); } } void main() { int count ; // get and verify input cout << "Enter count: " ; cin >> count ; if ( count <= 0 ) { cout << "Count must be positive." << endl ; return ; } countDown( count ) ; }