// Your Name // Date: // Program Title: // Program Description: #include #include #include #include using namespace std; // Named constants int main() { // Variable declaration float sideLength; int choice; //Program title and description for the user cout << "MENU TEMPLATE with SWITCH CASE" << endl << endl; // User input cout << "Choose the corresponding number for what task you want to complete." << endl; cout << "1 - perimeter of one side " << endl; cout << "2 - surface area of one side" << endl; cout << "3 - surface area of the entire box" << endl; cout << "4 - volume of the box." << endl; cout << "Enter selected number here: "; cin >> choice; // Calculations // Output to the screen switch (choice) { case 1: cout << "Perform task #1 : Perimeter of one side" << endl; //Input cout << "Enter the side length: "; cin >> sideLength; //Calculate and Output cout << "Side Perimeter Is: " << 4*sideLength << " Cubed Inches \n"; break; case 2: cout << "Perform task #2 : Surface area of one side" << endl; //Input cout << "Enter the side length: "; cin >> sideLength; //Calculate and Output cout << "Side Area Is: " << pow(sideLength, 2) << " Cubed Inches \n"; break; case 3: cout << "Perform task #3 : Surface area of the entire box" << endl; //Input cout << "Enter the side length: "; cin >> sideLength; //Calculate and Output cout << "Cube Surface Area Is: " << 6*pow(sideLength, 2) << " Cubed Inches \n"; break; case 4: cout << "Perform task #4 : Volume of the box" << endl; //Input cout << "Enter the side length: "; cin >> sideLength; //Calculate and Output cout << "Cube Volume Is: " << pow(sideLength, 3) << " Cubed Inches \n"; return 0; break; default: cout << "Input error; program is terminating" << endl; } return 0; }