/****************************************************** ** Name: ** Filename: labelarray.cpp ** Project #: Deitel & Deitel 4.16 ** Project Description: Label the elements of 3-by-5 double subscripted array sales to indicate the order in which they are set to zero by the following program segment: for ( row = 0; row < 3; row++ ) for ( column = 0; column < 5; column++ ) sales[ row ][ column ] = 0; ** Output: None ** Input: None ** Algorithm: None ******************************************************/ // Include files #include // used for cin, cout #include #include using namespace std; // Global Type Declarations // Function Prototypes void printArray( int [][5]); void instruct (void); void pause (); //Global Variables - should not be used without good reason. int main () { // Declaration section // Executable section instruct (); cout << "A labeled table of the elements of 3-by-5 double " << "subscripted array\nsales to indicate the order in " << "which they are set to zero. " << "\n\n\n [0][0] [0][1] [0][2] [0][3] [0][4]\n\n " << "[1][0] [1][1] [1][2] [1][3] [1][4]\n\n " << "[2][0] [2][1] [2][2] [2][3] [2][4] " << endl; pause (); return 0; } void instruct (void) { // Declaration section // Executable section } void pause () { // Declaration section // Executable section cout << "\nPress any key to continue..."; getch(); cout << "\r"; cout << " "; cout << "\r"; } /* Program Output A labeled table of the elements of 3-by-5 double subscripted array sales to indicate the order in which they are set to zero. [0][0] [0][1] [0][2] [0][3] [0][4] [1][0] [1][1] [1][2] [1][3] [1][4] [2][0] [2][1] [2][2] [2][3] [2][4] Press any key to continue... */