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
Leni [432]
3 years ago
7

write c++programs for the following problem: Let the user enter two numbers and display which is greater. please help!

Computers and Technology
1 answer:
zmey [24]3 years ago
3 0

Program to display greater number:


#include <iostream>                     <em>// Needed to perform IO operations    </em>

#include<conio.h>                     <em>  // header file</em>

using namespace std;  


int main()                                        //start of the program

{

   int a , b =0;                         //initialising the two integer variable

   cout<< "Enter first number"<<endl;  

    cin >> a;                                     //user's first number

    cout<< "Enter second number"<<endl;

    cin >> b;                                    //user's second number

     if (a>b)                       //comparing the two integers input by user

  cout<<  a << "is greater than" << b;    //display the greater number

    else

  cout<<  b << "is greater than" << a;                

return 0;                                                               // exist

}


     

You might be interested in
Atomic Term If an atom carries no charge, the positive charges from protons are balanced by the negative charges from the
Neko [114]

Answer:

yee ha

Explanation:

7 0
3 years ago
.Assume the following schedule for a set of three jobs, A, B, and C, with a single CPU. Assume that there is no i/o. --A runs fi
Fiesta28 [93]

Answer:

Check the explanation

Explanation:

Kindly check the attached images below to the see the step by step explanation to the question above.

7 0
4 years ago
What does CPC stand for?
Ahat [919]
I think it means cost per click depending on the actual context of why you need it.
Hope it helps
6 0
3 years ago
Read 2 more answers
Halp Computer Science
AleksandrR [38]

1st one: is memory

2nd one: is 8

8 0
3 years ago
Read 2 more answers
Flowchart to reverse digits of an integer
makkiz [27]
The flowchart to reverse digits of an integer may be explained like this: <span>If its a decimal number you could use modulus function to return the first lowest digit in the integer like 45%10 would give you a 5. By doing that you will have the number reversed. Lets see an example of that
 Flow: (Lets take for example 123)
 num = 123
loop
print num%10 (prints 3)
num = num/10 (num now is 12 - integer division removes remainder)
 end loop
 result : 321</span>
4 0
3 years ago
Other questions:
  • Write, compile and test (show your test runs!) program that calculates and returns the fourth root of the number 81, which is 3.
    11·1 answer
  • As a safe driver, you cannot, __________
    13·1 answer
  • Two technicians are discussing bleeding air from the brake hydraulic system. Technician A says to depress the brake pedal slowly
    10·1 answer
  • My PC won't output any data does anyone have any ideas​
    9·1 answer
  • Keely has an automation tool in place that runs a number of different processes for her and has for the last two years. All of a
    8·1 answer
  • Original documents or objects used during Internet research are known as
    8·2 answers
  • How does the autosum command calculate data? Need help ASAP​
    5·1 answer
  • What is the definition of shape
    14·2 answers
  • Pls say correct guyz pls pls pls
    7·1 answer
  • ANSWER QUICKLY!!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!