Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your third miniquest - Enter Now you'll weave the previous functions together with a third to create a fun experience. You must implement: void enter
Your third miniquest Enter
Now you'll weave the previous functions together with a third to create a fun experience. You must implement:
void enter;
which should communicate with the user via the console. It has the following very tight script. You need to adhere to it as accurately as possible to score the most points.
Immediately upon being invoked, it must curtly greet the user via std::cout using the string WhatNote that there is no space after the question mark. It must be followed by one newline.
Then enter an infinite loop. In each iteration of this loop,
a You must read a whole line of input from the user and respond to each as below
sequence is important, and responses must end in a newline
b If the user's input is an empty string, you must print the What line again and
shortcircuit back to the top of the loop skip the rest of the steps below
c Print spaces followed by the user's input and two newlines.
d If the user input contains an exclamation mark you must print the line
"OMG! You don't say!! followed by the user input and exactly five
exclamation marks. Then revert to the top of the loop.
e If the user input contains either of the words "why" or "what", you must print
the string Im sorry, I don't like questions that contain what or why." Then
revert to the top of the loop.
f If the user input contains the letter s then you must print two lines as follows
and then revert to the top of the loop.
i "Interethting. When did you thtop thtopping your thibilanth?"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started