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
Juan is a network administrator and must set up a VPN for his company's network. To allow safe communication, he should
Mekhanik [1.2K]

Answer:

select Control Panel, then Network Protocols, then Internet

4 0
2 years ago
25% of 60 min<br> 20% of 60 min<br> 33%% of 60 min
Alexxx [7]
15
12
19.8 cool cool cool
7 0
2 years ago
How many bits are required to encode an image that is 25 pixels wide and 50 pixels tall, if you encode each pixel with 12 bits o
AURORKA [14]

Just multiply all numbers to get the total number of bits:

25*50*12 = 15000 bits.

3 0
3 years ago
#Write a function called is_composite. is_composite should #take as input one integer. It should return True if the #integer is
malfutka [58]

Answer:

// A optimized school method based C++ program to check  

// if a number is composite.  

#include <bits/stdc++.h>  

using namespace std;  

bool isComposite(int n)  

{  

// Corner cases  

if (n <= 1) return false;  

if (n <= 3) return false;  

// This is checked so that we can skip  

// middle five numbers in below loop  

if (n%2 == 0 || n%3 == 0) return true;  

for (int i=5; i*i<=n; i=i+6)  

 if (n%i == 0 || n%(i+2) == 0)  

 return true;  

return false;  

}  

// Driver Program to test above function  

int main()  

{  

isComposite(11)? cout << " true\n": cout << " false\n";  

isComposite(15)? cout << " true\n": cout << " false\n";  

return 0;  

}

Explanation:

3 0
3 years ago
Why is it important to install updates? Why should you use the Power button on the Start menu instead of the Power button on you
IrinaK [193]

Answer:

Software updates do a lot of things. Software updates offer plenty of benefits. ...

Updates help patch security flaws. Hackers love security flaws, also known as software vulnerabilities. ...

Software updates help protect your data. ...

It’s not all about you. ...

You deserve the latest and greatest

Explanation:

hope that worked

3 0
3 years ago
Other questions:
  • Windows server 2012 r2 includes hyper-v in which edition(s)?
    12·1 answer
  • What is the amount of a good or service that business have available to sell?
    13·1 answer
  • _____ documentation is designed to help programmers and systems analysts understand the application software and maintain it aft
    12·1 answer
  • Jenny wants to create a résumé after a two-years gap. What should she consider?
    11·2 answers
  • Enterprise application integration (eai) software enables users to model the business processes and interactions that should occ
    8·1 answer
  • Dora electronically transferred $591.68 from her checking account to Matt's checking account. In what column of the check regist
    14·2 answers
  • Why is an ISA unlikely to change between successive generations of microarchitectures
    11·1 answer
  • Similarites between hardware and software
    9·1 answer
  • Why might reading a product review be a good idea before purchasing a product?
    5·2 answers
  • Pls Help need it before 1pm PLS.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!