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
How can I make a video game?
Rainbow [258]
You first need to figure out what kind of game you would like to create. Find codes and certain websites that will help you set up and or make a game.
3 0
3 years ago
Read 2 more answers
What was the first e-commerce service?
docker41 [41]

The first e-commerce service would be A)Banking. Hope this helps.

8 0
3 years ago
Which of the following best meets the requirements of a strong password?
Hoochie [10]

Answer:

having a capital and lower case letters and a special characters and numbers.

Explanation:

it should be hard but easy enough to remember and no one will know

6 0
3 years ago
Read 2 more answers
Suppose you want to delete an existing file from within word. What would you do?
Oksana_A [137]
Go in to ur files and find the file and delete it
5 0
3 years ago
What is a different paragph formatting tools
soldi70 [24.7K]
You can have paragraph alignment which is left, right, and center
5 0
3 years ago
Other questions:
  • What determines the method of controlling motor speed?
    5·1 answer
  • Which of the following statements is true of ASCII code?
    12·1 answer
  • Binary code what does this mean I was sick so I don't under stand
    7·2 answers
  • Please draw a diagram of a complete graph with 5 vertices (K5), its adjacency matrix and adjacency list representations.
    5·1 answer
  • Why does a satellite requires two bridges?
    11·1 answer
  • A user calls to report that she is experiencing intermittent problems while accessing the wireless network form her laptop compu
    9·1 answer
  • What was a result of george washington's belief in the sovereignty of the people instead of monarchy?
    9·1 answer
  • What is computer system ?​
    9·2 answers
  • How do we produce quality work in editing audio?
    7·1 answer
  • when an overridden method is called from within a subclass, it will always refer to the version of that method defined by the (a
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!