CST116 C++ 6.4 5a pg 126 #1 1. 0 2 3 2 1 7.1 pg 148 #1-6 1. The sign is reversed. it should be <= int_exp1 <= int_exp2 2. There should be 2 equal signs int_exp1 == int_exp2 3. ! should be on the other side int_exp1 != int_exp2 4. Cant compare a string literal using relational quotes char_exp == 'A' 5. This is correct 6. Has to have int_exp1 (on each side of operator) int_exp1 < 2 && int_exp1 > -10 7.2 pg 155 #1 #include #include #include #include using std::cout; using std::endl; using std::string; int main() { int money; int accounts; //take the number of accounts cout << "How many accounts do you have with us today?\n"; std::cin >> accounts; //take the money amount cout << "How much money do you have in your account(s)?\n $"; std::cin >> money; //if x>=25,000 is platinum //if 10,00010,000 but only 1 account is silver //if x<=10,000 is copper if ((money >= 25000) & (accounts == 2)) { cout << "You are a Platinum member!"; } else if ((money >= 25000) & (accounts == 1)) { cout << "You are a Platinum member!"; } else if (((10000 < money) && (money < 25000)) & (accounts > 1)) { cout << "You are a Gold member!"; } else if (((10000 < money) && (money < 25000)) & (accounts == 1)) { cout << "You are a Silver member"; } else if ((money <= 10000) & (accounts == 2)) { cout << "You are a Copper member"; } else if ((money <= 10000) & (accounts == 1)) { cout << "You are a Copper member"; } return 0; } 5b 7.4 pg 161 #1 #include #include using std::endl; using std::cout; int main() { int selection; cout << "Student Grade program\n -Main Menu- \n\n1. Enter Name\n2. Enter test scores\n3. Display test scores\n9. Exit\n\nPlease enter your choice from the list above\n\n"; std::cin >> selection; switch (selection) { case 1 : cout << "\n\nYour choice is: Enter Name?\n\n"; break; case 2: cout << "\n\nYour choice is: Enter Test Scores?\n\n"; break; case 3: cout << "\n\nYour choice is: Display Test Scores?\n\n"; break; case 9: cout << "\n\nYour choice is: to Exit?\n\n"; break; default: cout << "\n\nYour selection is invalid... Try again\n\n"; } }