Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

URGENTTTTTT HELP PLSSSS
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions