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
The first document users see when accessing a Web site is the site<br> map. True or false
valentinak56 [21]

Answer: True

Explanation:

6 0
3 years ago
What are two ways technology has helped improve in the way we deal with waste?
topjm [15]
It allow us to monitor and study our environment to better understand how it works and the impact of our actions on it and It allows for paperless communication like email and online bill paying to reduce the amount of trees cut down
3 0
3 years ago
Read 2 more answers
Define a function named SwapValues that takes four integers as parameters and swaps the first with the second, and the third wit
velikii [3]

The program is an illustration of functions

<h3>What are functions?</h3>

Functions are named program statements that are executed when called or evoked

<h3>The actual program</h3>

The program written in Python, where comments are used to explain each line is as follows:

#This defines the function

def SwapValues(a, b, c, d):

   #This returns the swapped values

   return b, a, d, c

#The following gets input for the four integers

a = int(input())

b = int(input())

c = int(input())

d = int(input())

#This calls the SwapValues function

a, b, c, d = SwapValues(a, b, c, d)

#This prints the swapped values

print(a,b,c,d)

Read more about python functions at:

brainly.com/question/14284563

8 0
2 years ago
Who wants to trade ro^lox accounts
telo118 [61]
Make me brainlestttt please and thank you and the answer is no
8 0
3 years ago
Read 2 more answers
In a PowerPoint presentation, it is not possible to add notes that are hidden from the audience's view.
kvasek [131]

it actually is false i just checked

7 0
3 years ago
Other questions:
  • Arrange the steps for conflict resolution in proper sequence.
    11·2 answers
  • Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty
    6·1 answer
  • Which of the following TCP/IP settings should be configured to specify DNS suffixes to use other than resolving names through a
    9·1 answer
  • You are a desktop administrator for Nutex Corporation. A user reports that he is unable to access network resources. You notice
    15·1 answer
  • Harlequin frogs are an endangered species that live in a small area of Costa Rica. The reasons for the species' decline is unkno
    10·1 answer
  • Explain the reason why vector graphics are highly recommended for logo​
    5·1 answer
  • Which command could you use to change to the /usr directory using a relative pathname?
    8·1 answer
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
  • What kind of energy transformation occurs when you call someone on a cell phone?
    11·1 answer
  • How do you enlarge an image to see more detail on it? (1 point)
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!