Question: In C++ code, write a single program with a menu function that will solve the below two problems and match the program run screen below.
In C++ code, write a single program with a menu function that will solve the below two problems and match the program run screen below. The functions must have comments explaining what each part is accomplishing.
Problem 1. The program will ask the user to enter a sequence of scores between 0 and 100, inclusive. The program then will print out the stats about these scores, including: the number of scores the maximum score the minimum score and the average score If there are no scores entered, the output message shall just say that there is no score.
The following two functions should be used:
void get_scores(vector
Problem 2. The program will ask the user to enter a sentence. The program will then display a message to indicate if this sentence is a palindrome. The following sentence is a palindrome: A nut for a jar of tuna. The white space and non English letters are not counted. The case difference is ignored. Make sure your program will take a sentence as input not just a string with no space in it.
The following function should be used:
bool is_palindrome(string sentence); // return true if the sentence is a palindrome; // false otherwise
Program run screen:
1. Score Stats
2. Palindrome Test
3. Quit
Please enter your choice: 1
Enter scores, enter -1 to stop: 87 98 65 78 88 93 -1 There are total 6 scores The highest score is: 98 The lowest score is: 65 The average score is: 84.8333 Do you want to try another set of scores? Y/N: y Enter scores, enter -1 to stop: -1 There is no scores. Do you want to try another set of scores? Y/N: n
1. Score Stats
2. Palindrome Test
3. Quit
Please enter your choice: 2
Enter a sentence: A nut for a jar of tuna "A nut for a jar of tuna" is a palindrome Do you want to try another sentence? Y/N: y
Enter a sentence: Hello World
"Hello World" is not a palindrome
Do you want to try another sentence? Y/N: n
1. Score Stats
2. Palindrome Test
3. Quit
Please enter your choice: 3
Program ended with exit code: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
