Question: C++ function 5. Function name: AskYesNo Specification: This function has 1 parameter, representing a yes-or-no question to ask. When it runs, it must: Prompt the

C++ function  C++ function 5. Function name: AskYesNo Specification: This function has 1

5. Function name: AskYesNo Specification: This function has 1 parameter, representing a yes-or-no question to ask. When it runs, it must: Prompt the user with the given question Get one character of input. Do input validation, re-asking the question until the user types "y or "n . Return true or false depending on the user's response e What to do in main0: First, by calling the AskYesNo function, ask the user "Do you want to learn a fun fact about" Replace the with a subject of your choice! Depending on the return value from the function call, print one of these: "Ok, no fun fact today" OR Here is your fun fact:... Add the fun fact of your choice! 6. Function name: InputWithinRange o Specification: This function handles getting an integer input from the user It has 2 parameters, representing the lowest valid number the highest valid number When it runs, it must prompt the user with a question in this form: Enter a number from Lowest to highest (In the prompt, lowest and highest should be actual numbers, based on the value of the two parameters.) After the users first input, the function must do input validation, forcing them to re-enter repeatedly until they give a valid number Once a valid number has been entered, the function must return the number entered

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!