About a code.
Hi, I am getting my code to compile. But when i try entering the Number 2 is telling me "Program ended with the code : 02. How can I fix that so that I can enter 2 and not have to enter the #1 everytime. #include <iostream> #include <iomanip> using namespace std; int main () { int choose; double length, width, area; double radius; const double PI = 3.14; const int SQUAREROOM = 1, RECTANGULARROOM = 2, ROUNDROOM = 3, QUIT = 4; // A) Show Haverly's Room Calculator. cout << "Haverly's Room Calculator: \n"; cout << "******************************\n"; cout << "1. Square Room\n"; cout << "2. Rectangular Room\n"; cout << "3. Round Room\n"; cout << "4. Quit\n"; cout << endl; cout << "Please enter a menu item(1-4)\n"; cin >> choose; if (choose == SQUAREROOM >=(1-3)) { cout << "Enter the width of the room.\n"; cin >> width; area = width*width; cout << "The area of the squareroom is \n" << area << endl; } if (choose == RECTANGULARROOM >=(1-3)) { cout << "Enter the length and width of the room.\n"; cin >> length >> width; area = length*width; cout << "The area of the rectangular room is \n" << area << endl; } if (choose == ROUNDROOM >=(1-3)) { cout << "Enter the radius of the room.\n"; cin >> radius; area = PI*radius*radius; cout << "The area of the roundroom is \n" << area << endl; } if (QUIT == 4) { cout << "Thank you for using Haverly's Calculator. \n"; } return 0; }