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]
3 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]3 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
A group of small local businesses have joined together to share access to a cloud-based payment system. Which type of cloud is m
Valentin [98]

The type of cloud that is most likely being implemented when a group of small local businesses has joined together to share access is community cloud service. The correct option is C.

<h3>What is cloud service?</h3>

Cloud services have a wide variety of services for companies and businesses. They provide applications and software with resources. They provide easy and affordable services.

Community cloud service is a shared type of cloud service that helps banks and heads of trading firms.

Thus, the correct option is C. Community.

To learn more about cloud service, refer to the below link:

brainly.com/question/24227961

#SPJ1

The question is incomplete. Your most probably complete question is given below:

Public

Private

Community

Hybrid

6 0
2 years ago
What are the important points
LUCKY_DIMON [66]

Answer:

You must evaluate information

Explanation:

The first step to thinking critically is to accept information only after evaluating it. Whether it's something read or heard, critical thinkers strive to find the objective truth. In doing this, these employees evaluate by considering possible challenges and solutions. This process of vetting new information and considering outcomes is called evaluation.

6 0
3 years ago
In multi-grade oil what is W means?
Simora [160]

Answer:

winter viscosity grades

Explanation:

6 0
3 years ago
Write the function prototype for a function called showSquare. The function should have a single parameter variable of the int d
xeze [42]

Answer:

void showSquare(int param){

}

Explanation:

In C++ programing language, this is how a function prototype is defined.

The function's return type (In this case Void)

The function's name (showSquare in this case)

The function's argument list (A single integer parameter in this case)

In the open and closing braces following we can define the function's before for example we may want the function to display the square of the integer parameter; then a complete program to accomplish this in C++ will go like this:

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>void showSquare(int param);</em>

<em>int main()</em>

<em>{</em>

<em>    showSquare(5);</em>

<em>    return 0;</em>

<em>}</em>

<em>void showSquare(int param){</em>

<em>int square = param*param;</em>

<em>cout<<"The Square of the number is:"<<endl;</em>

<em>cout<<square;</em>

<em>}</em>

8 0
4 years ago
Karen is designing a website for her uncle's landscaping business. She wants to ensure that it's engaging and provides a lot of
Rashid [163]

Explanation:

Talk About The Benefits. of your  service over other compines

4 0
3 years ago
Other questions:
  • Assume that x is a double variable that has been initialized. Write a statement that prints it out, guaranteed to have a decimal
    5·1 answer
  • To join two or more objects to make a larger whole is to _____________ them.
    11·2 answers
  • 2. Write a program with a function that accepts a string as an argument and returns a copy of the string with the first characte
    11·1 answer
  • List the steps in setting up an online banking account
    12·2 answers
  • Does anyone know answers for reading plus level h and j
    13·2 answers
  • Question #2
    11·1 answer
  • Use the drop-down menus
    9·2 answers
  • Jak sie pisze oł na klawiaturze komputerowej
    11·1 answer
  • In the code below, what's the final value of the variable x?
    8·1 answer
  • Heuristics are not always completely accurate.<br><br><br> Correct or wrong?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!