Question: The project will solve two problems. Problem 1 The program will ask the user to enter a sequence of scores between 0 and 1 0
The project will solve two problems.
Problem
The program will ask the user to enter a sequence of scores between and 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 students should implement the following two functions to solve this problem.
void getscoresvector &v;
get integer scores from keyboard and store in v
we assume that the user will input scores in range
of to inclusive. User enter a negative
number to stop the input and end the function
void printstatsvector &v;
print out the stats of data that are stored in v
includes: max, min, total number of data,
and the average
Problem
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 students should implement the following function to solve this problem
bool ispalindromestring sentence;
return true if the sentence is a palindrome;
false otherwise
Sample Run
Note: I use symbol to show user inputs, you do NOT need to do in your program.
Enter scores, enter to stop:
There are total scores
The highest score is:
The lowest score is:
The average score is:
Do you want to try another set of scores? yN: Dy
Enter scores, enter to stop:
There is no scores.
Do you want to try another set of scores? yN: In
Enter a sentence: M nut for a jar of tuna
"A nut for a jar of tuna" is a palindrome
Do you want to try another sentence? YN: y
Enter a sentence: Hello world
"Hello world" is not a palindrome
Do you want to try another sentence? YN: #n
Program ended with exit code:
Submission
Before you submit your file to Blackboard, please make sure:
Your file name is correct, as
You file can be successfully compiled and run without any errors.
Upload only
file to
link inside
folder.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
