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
Gekata [30.6K]
3 years ago
9

Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l

arger", "The second number you entered is larger". Save file as LargerorNot.cpp
Computers and Technology
1 answer:
VikaD [51]3 years ago
7 0

Answer:

Following are the program in c++

#include <iostream> // header file

using namespace std; // namespace

int main() // main function

{

double a,b; // variable declaration

cout<<"Enter the first number and second number : \n";

cin>>a>>b; // input the number

if(a>b) // check first number greater than second number

{

cout<<"The first number you entered is larger";

}

else

{

cout<<"The second number you entered is larger";

}

return 0;

}

Output:

Enter the first number and second number :

45.5

687.8

The second number you entered is larger

Explanation:

In this program we have declared two variable i.e a and b of double type. After that check the condition if(a>b) if this condition is true then display  the message "The first number you entered is larger " otherwise display the message  "The second number you entered is larger".

You might be interested in
What will be displayed if code corresponding to the following pseudocode is executed? Set Number = 4 Repeat Write 2 * Number Set
Elis [28]

Answer:

8

12

Explanation:

I made the code a bit easier to understand then worked out how it would go. Here's what I did.

number = 4

repeat until number = 8:

   write 2 * number

   number = number + 2

Following this itenary, we have, the system first writes "8" as it multipled 4 by 2. Number is now equal to 6.

Next repetition, the system writes "12" as it multipled 6 by 2. Now, number = 8. The proccess now stops as number is now equal to 8.

5 0
3 years ago
When one method calls another, which of the following statements are true? The class methods and instance methods of one class m
Ivenika [448]

Answer:

All the 3 statements are true.

Explanation:

1. The class methods and instance methods of one class may call the public class methods of another class using dot notation and referencing the name of the other class.

2. The class methods and instance methods of one class may call the private instance methods of another class by using dot notation to invoke the method on an instance of the other class.

3. The instance methods of a class may call, without using dot notation, any class method of the same class.

All the above mentioned statements are true.

6 0
3 years ago
Ask what kind of pet the user has. If they enter cat, print "Too bad...", if they enter dog, print "Lucky you!" (You can change
nirvana33 [79]

Answer:

Explanation:

a = input("what kind of pet the user has")

if a == 'cat':

  print("Too bad")

elif a == 'dog':

   print("Lucky you!")

8 0
3 years ago
Which subscription option, if any, includes online banking, access from any device at any time, and integration with a wide rang
max2010maxim [7]

Answer:

The correct answer is: All QuickBooks Online subscription levels.

Explanation:

QuickBooks is an online accounting software that allows companies to handle their book-keeping just like accountants do on paper but storing the information in a hub. In that way, executives of a firm can have access to that information easily wherever they are since most operations can be synchronized to be done with mobile devices.

Features such as online banking and integration to mobile apps are included from QuickBooks' basic plans.

7 0
3 years ago
Read 2 more answers
Who wants points cuz i got some
harina [27]
Me thank you very much
4 0
3 years ago
Read 2 more answers
Other questions:
  • There are two algorithms called Alg1 and Alg2 for a problem of size n. Alg1 runs in n2 microseconds and Alg2 runs in 100n log n
    13·1 answer
  • Which of the following is an external hard drive
    11·1 answer
  • 2) Complete the get_num_of_characters() function, which returns the number of characters in the user's string. We encourage you
    11·1 answer
  • HELP ME PLEASE
    9·2 answers
  • The picture that graphically represents the items you use in Windows is called a/an
    15·1 answer
  • An inventory clerk, using a computer terminal, views the following on screen: part number, part description, quantity on hand, q
    8·1 answer
  • Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
    13·1 answer
  • What is the difference between paper size and page margins in word
    5·2 answers
  • The 'WIMP' environment is much more user friendly,why?​
    11·2 answers
  • Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction stor
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!