Question: URGENTTTTTT HELP PLSSSS Question 8 Write a program that reads a one-line sentence as input and then displays the following response: . the sentence ends

Question 8 Write a program that reads a one-line sentence as input and then displays the following response: . the sentence ends with a question mark (?) and the input contains an even number of characters, . If the sentence ends with a question mark (?) and the input contains an odd number of characters, -If the sentence ends with an exclamation point (), display the word Wow. In all other cases, display the words You always say, followed by the input string enclosed in quote Be sure to note that in the last case, your output must include quotation marks around the echoed input output. Your program does not have to check the input to see that the user has entered a legitimate ser Examples: Input: Is she okay? Output: Yes Input: Is he okay? Output: No Input: What a day! Output: Wow Input: I studied hard. Output: You always say, "I studied hard." 8 points and then displays the following response: he input contains an even number of characters, display the word Yes. e input contains an odd number of characters, display the word No. splay the word Wow. followed by the input string enclosed in quotes. Your output should all be on one line. de quotation marks around the echoed input string. In all other cases, there are no quotes in the ee that the user has entered a legitimate sentence
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
