6.2k views
0 votes
Write a program that prints the question " Do youwant to continue? " and reads a user input. if the userinput is " Y ", " OK", or " Why not? ", printout " OK ". if the user input is "No " , then print out " Terminating ", Otherwise print " Bad input". The case of the user input should notmatter. For example, "y" or "yes" are also valid inputs. Write aclass YesNoChecker for this purpose.

User Goofology
by
6.7k points

1 Answer

4 votes

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() in=="yes"

Step-by-step explanation:

I have taken a string in.

Then taking input from user.

Checking the conditions using if else if ladder.

User Dimitris Tavlikos
by
7.2k points