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
Maria is an experienced programmer who has worked on different projects. she was recently promoted to be a software development
aleksklad [387]
Maria would have to have experience of being a leader, confident,and would have to be serious about her job. She would have to control everybody on the team and keep them on task.
8 0
3 years ago
Read 2 more answers
Two or more computers connected together is referred to as a(n)
son4ous [18]
Two or more computers connected together is referred to as a network.
So the answer is <span>B. network.</span>
8 0
3 years ago
You are opening a store, and having a working website is an important part of your project plan. The company that started creati
masya89 [10]

Answer:

I think it might be Budget and time. :)

5 0
3 years ago
Write structured pseudocode to show the following: when you are on time for work you have time to buy coffee
faltersainse [42]

Answer:

If( on_time == True) {

     print("Coffee")

} else {

    print("No Coffee")

}

Explanation:

Step 1 evaluate with a boolean variable if you are on time

If( on_time == True) {

Step 2 if true you have coffee

print("Coffee")

Step 3 if false you have not coffee

print("No Coffee")

3 0
3 years ago
See attached. I have code typed out but still having problems.
densk [106]

The constructor that takes four arguments: the title, the artist, and two arguments representing the song length in minutes and seconds is given below:

<h3>The Java Code</h3>

public class Song

{

   // instance variable declaration

  private String songTitle;

  private String songArtist;

  private Duration songLength;

// Constructors

  public Song (String title , String artist , int min , int sec )

  {

       this( title , artist , Duration.ofMinutes( min ).plusSeconds( sec ) ) ;

  }

  public Song (String title , String artist , int totalSeconds )

  {

      this( title , artist , Duration.ofSeconds( totalSeconds ) ) ;

  }

  public Song (String title , String artist , Duration duration )

  {

      this.songTitle = title;

      this.songArtist = artist;

      this.songLength = duration ;

  }

Read more about java programming here:

brainly.com/question/18554491

#SPJ1

5 0
1 year ago
Other questions:
  • Which fingers do you use to type the following letters rtgvf
    11·1 answer
  • which option of the AutoCorrect tool enables you to add and delete words that do not follow abbreviation rules?
    10·2 answers
  • Is USA TestPrep a test-taking site that won't let you access other windows without kicking you off?
    13·1 answer
  • The hypothalamus controls the anterior pituitary by means of: a. releasing hormones b. second messengers c. third messengers d.
    14·1 answer
  • The File method lastModified() returns
    10·1 answer
  • Which orientation style has more height than width?
    11·1 answer
  • To discover how many cells in a range contain values that meet a single criterion, use the ___ function
    5·1 answer
  • Write a function that will sum all of the numbers in a list, ignoring the non-numbers. The function should takes one parameter:
    8·1 answer
  • Who is big brain me or you
    14·1 answer
  • How can you protect your information when using wireless technology
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!