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]
2 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]2 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
¿En qué países se ha implementado un sistema de vigilancia a través de drones?, ¿qué aspectos positivos y negativos ha generado?
mel-nik [20]

Answer:

17 países.

Explicación:

Hay diecisiete países que tienen vehículos aéreos no tripulados armados y donde se ha implementado un sistema de vigilancia con drones. Los drones son excelentes para recopilar grandes cantidades de datos de imágenes. Se puede implementar fácilmente para la vigilancia y mantener la seguridad. Se puede conducir a través de la computadora, no del piloto en él, por lo que el piloto se guarda. Los aspectos negativos de los drones es que tienen tiempos de vuelo cortos y el clima puede afectar fácilmente a los drones. Las operaciones precisas son difíciles y también eliminan futuros trabajos.

7 0
2 years ago
How long does a bankruptcy affect your financial reputation
Diano4ka-milaya [45]
It effects it until it is refilled to its normal amount
3 0
3 years ago
Why should you limit what information is in your digital footprint?
oee [108]

Answer:

Your “digital footprint” includes all traces of your online activity, including your comments on news articles, posts on social media, and records of your online purchases. When you know the boundaries of your digital footprint and take steps to contain it, you can help protect your identity and your reputation.

Explanation:

3 0
3 years ago
3.5 Code Practice: Question 1<br> (Website: Edhesive)
igor_vitrenko [27]
Sorry the website wasn’t working for me
3 0
2 years ago
Jack was drinking a glass of water near his computer when his dog bumped his arm, spilling water on his keyboard. What is the fi
Anvisha [2.4K]

Answer:

4no. is the answer may be

3 0
2 years ago
Read 2 more answers
Other questions:
  • Suppose we perform a sequence of n operations on a data structure such that if some condition C(k) holds then the kth operation
    7·1 answer
  • Since the web.xml file describes how the web application should be configured when it is deployed on a server, the file is known
    7·1 answer
  • Which of the following statements accurately describes linked data?
    5·1 answer
  • Choose the correct term to complete the sentence.
    12·1 answer
  • WILL GIVE BRAINLIEST!!!!!!!
    10·2 answers
  • What is digital marketing?
    5·1 answer
  • The landscape layout is more appropriate for leaflet. <br> TRUE OR FALSE
    6·1 answer
  • Please help! first one to answer correctly gets brainliest and thanked
    7·1 answer
  • Your program has a loop. You want to exit the loop completely if the user guesses the correct word.
    6·2 answers
  • Why is it important to prepare the farm resources before you start working? explain​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!