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
Algorithm and flowchart:- find the product of two number (a and b)​
Korvikt [17]

Answer:

i have no idea a i guess

Explanation:

5 0
3 years ago
Consider the latency model for static congestion windows. If the server receives an acknowledgement for the first data segment i
Angelina_Jolie [31]

Answer:

Latency of an object O is shown below.

Explanation:

W segment and stalled state transmits nothing and waits for acknowledgement. The latency is 2 R TT + the time required for server that are using to transmit the object + the amount of time when server is in stalled state. Let K be the number of window that is K= O/WS .The serveries stalled state where K-1 is period of ime with period lasting RTT-(W-1)S/R

latency = 2RTT +O/R +(K-1)[S/R +RTT - WS/R]

After combining the two case

latency = 2 RTT + O/R + (K-1)[S/R +RTT - WS/R]

where [x] means maximum of (x.0). This is the complete ananlysis of the static windows.

server time for transmit the object is (K-1)[S/R +RTT - WS/R]

7 0
3 years ago
In powerpoint, what is line thickness measured in?
katrin [286]
Impasto. Hope this helps!
5 0
3 years ago
Most users find settings between ____ to be the most convenient option for how long the computer sits idle before the screen sav
Sphinxa [80]
I would say about 5 to 10 minutes
3 0
3 years ago
Of the choice below,access to with tab will start a power point presentation
kow [346]

the menu and the toolbars
4 0
3 years ago
Other questions:
  • Options to rotate cells in excel are available using the _____ button in the alignment group on the home tab.
    10·1 answer
  • Which expresses 6y : 9y in its simplest form?
    12·1 answer
  • Explain why an IT department and a user support group may disagree about the responsibility for the development of end-user appl
    8·1 answer
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    12·1 answer
  • 01:24:3
    11·1 answer
  • If I write too much for an exam answer, do I get downgraded?
    7·1 answer
  • Cmo se puede añadir amigo ??'
    12·1 answer
  • I need so much help, can anyone please help me?
    15·1 answer
  • Can both mediated interpersonal communication and mass communication has an ability to reach huge number of recipients or audien
    11·1 answer
  • What is data intergrity​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!