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 space force enhancement function concerned with providing data on meteorological, oceanographic, and space environmental fac
Darya [45]

Answer:

Environmental Monitoring

Explanation:

The space force enhancement function concerned with providing data on meteorological, oceanographic, and space environmental factors that might affect operations in other battle-space dimensions is environmental monitoring.

8 0
3 years ago
What is installing?
GalinKa [24]

The process of putting new software on a computer

3 0
2 years ago
Read 2 more answers
1. JAVA Create one method to do the following expressions. Given the following declarations, what is the result of each of the e
nordsb [41]
<span>public void myMethod(int w, int y, int z) {
</span>int a, b, c, d, e, f, g, h, i, j, k, l;

<span>a = w * z;
</span>b = w * z + y;
c = w * -z;
d = w * --z + y++;
e = w * z-- + ++y<span> ;
</span>f = w + z * y;
g =  w – y + z;
h = (w + y) * z;
i = y / w;
j = y / z;
k = w % y;
<span>l = y % w;
</span>System.out.println( "%d %d %d %d %d %d %d %d %d %d %d %d", a,b,c,d,e,f,g,h,i,j,k);
}

To use 
myMethod(2, 7, 12);
7 0
3 years ago
Choose the word that best completes this sentence. ____________ should cover every part of the worksite.
Evgen [1.6K]
Since you provide no choices, here are several things that should cover every part of the worksite :
- Emergency exit
- Safety measures

Hope this helps
5 0
3 years ago
Read 2 more answers
Joel has left his computer unattended while answering a phone call. A TV repairer in his house tries to surf through the applica
fomenos
The privacy-related risk that threatens Joel is the data breach. The data breach occurs when someone or an individual is likely to breach private information in which the individual is likely to stole, transmit, or gain access to someone else's data without their knowledge or knowing that someone is accessing their personal data.
6 0
3 years ago
Other questions:
  • A digital footprint is all of the information on-line about a person posted by that person or others, ____________. intentionall
    14·1 answer
  • A(n ____ with a drop down menu provides consistency in function and appearance making it easy for users to learn and work with t
    7·1 answer
  • How can I change it to accepted file types: .ppt, .pptx, .xls, .xlsx, .doc, .docx, .zip, .pdf, .accdb, .msg on Inkscape?
    15·2 answers
  • A porta power tool is what kind of tool
    9·1 answer
  • What is the program that searches through data bases?
    10·1 answer
  • Which sign or symbol will you use to lock cells for absolute cell reference
    5·1 answer
  • How do you add a PDF assignment to google docs and be able to edit it?
    13·1 answer
  • When using a function to preform a calculation how would you select the range of numbers to use
    13·1 answer
  • susan wrote the recursive formula for the sequence represented by the exploit formula An=3+2n. put an C net to any correct state
    13·1 answer
  • Microsoft recommends when that you create passwords with upper and lowercase letters, numbers, symbols, and use at least _______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!