1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svetllana [295]
2 years ago
6

Write a program that prints the question " Do youwant to continue? " and reads a user input. if the userinput is " Y ", " OK", o

r " 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.
Computers and Technology
1 answer:
Nataly_w [17]2 years ago
7 0

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

   string in;//string in for taking input...

   cout<<"Do you want to continue ?"<<endl;

   getline(cin,in);//taking input from the user...

   if(in=="y"||in=="Y"||in=="yes"||in=="OK"||in=="Why not?")//conditions..

   cout<<"OK"<<endl;

   else if(in=="No")

   cout<<"terminating"<<endl;

   else

   cout<<"Bad input"<<endl;

return 0;

}

Explanation:

I have taken a string in.

Then taking input from user.

Checking the conditions using if else if ladder.

You might be interested in
What is one similarity between low-and high-level programming languages? (5 points)
aleksandr82 [10.1K]

Answer:

Both high and low level computer languages are used to communicate directly with a computer, so the answer is D.

Explanation:

5 0
3 years ago
You are designing a VPC for a small application. It will operate in a private subnet and needs internet access to software updat
lilavasa [31]

Answer:

Refer below.

Explanation:

VPC, Subnets, Route Table(s), Nat Gateway, and Internet Gateway. These are the least required services to provide internet access to a private EC2 instance. NAT gateway requires an internet gateway.

3 0
3 years ago
What vowel(s)!are Missing in the Word= "a b t" ???
grigory [225]
O AND U which spells ABOUT
5 0
3 years ago
Helllp me you will git 16 points
siniylev [52]

Answer:

False

Hope it helps...

Have a great day :P

8 0
3 years ago
Read 2 more answers
The top-level domain name of .com indicates that the website is
Ira Lisetskai [31]
C. commercial

is ur answer
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which delivery model is an example of a cloud computing environment that provides users with a web based email service ?
    9·2 answers
  • When you boot up a computer and hear a single beep, but the screen is blank, what can you assume is the source of the problem?
    11·2 answers
  • Design a hierarchy of classes, where the Media superclass has the artistName and the mediaName as the common attributes. Create
    14·1 answer
  • The game often becomes stuck on landscape mode when tilting the device during gameplay, which cuts off some peripheral text. A w
    8·1 answer
  • What is a geam in the ggplot2 system?
    5·1 answer
  • Which category does this fall in identity theft​
    6·1 answer
  • Phil wants to make a dark themed superhero movie. What could be his target demographic
    11·2 answers
  • That’s what I have so far. I need help!
    5·1 answer
  • Whats 12/29 divided by 12/34
    7·2 answers
  • c g given an array, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero eleme
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!