#include //#include using namespace std; string rating; int age; // This assignment is worth 4 points. int main() { cout << "Enter movie rating: "; cin >> rating; cout << "Enter age: "; cin >> age; // Use logical OR statements to combine multiple conditions that // would lead to the same output. if(rating == "G" || rating == "PG" && age >= 9 || rating == "PG-13" && age >= 13 || rating == "R" && age >= 17) cout << "Suitable movie. Enjoy!" << endl; else cout << "Unsuitable movie. Enjoy the review!" << endl; /* * Alternatively, if you want to get meticulous, you can use one set * of if/else if statements to handle whether if the user has inputted * an actual movie rating, and then another to print the appropriate * string response. You can also use const on strings as well, if you * want to avoid typing in the same phase over and over again. */ return 0; }