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
What is TCP/IP's Transport layer's primary duty?
lorasvet [3.4K]

Answer:

 The TCP/IP is the transmission control protocol and internet protocol and in the TCP/IP model the transport layer is the second layer.

The primary responsibility of this layer is that it is basically used to deliver messages to the host and that is why it is known as end to end layer.

It basically provide the point to point connection between the destination to server host for delivering the various types of the services efficiently and reliably.

In the TCP/IP model the transport layer are basically responsible for transferring the data or service error free between the server to destination host.

3 0
3 years ago
Alejandra is using a flash drive that a friend gave to her to copy some financial records from the company database so she can c
Misha Larkins [42]

Answer:

maybe threat?

Explanation:

4 0
3 years ago
5. ADD A STATEMENT OR STATEMENTS to the program on the following page (including constant and/or variable declarations if you wa
kvasek [131]

Answer:

C code is explained below

Explanation:

#include <stdio.h>

int main() { /* main */

/*

      **********************************************************

      * Declaration Section

      **********************************************************

      *

      * Named Constants

      */

  const int bits_per_byte = 8;

  const int attention_span_in_seconds = 3;

  /*

  * You can insert stuff after this comment.

*/

/*

* Local variables

*/

  int modem_send_speed_in_bits_per_second = 56000;

  int script_file_length_in_bytes = 28000;

  int seconds_to_send_script_file;

  /*

  * You can insert stuff after this comment.

*/

/*

      **********************************************************

      * Execution Section

      **********************************************************

      *

      * You can insert stuff after this comment.

*/

  seconds_to_send_script_file =

      (script_file_length_in_bytes * bits_per_byte) /

      modem_send_speed_in_bits_per_second;

  if (attention_span_in_seconds < seconds_to_send_script_file)

      printf("1\n");

  else printf("0\n");

} /* main */

4 0
3 years ago
How many times is the second for loop going to loop in this block of code? Write your answer in numeric form in the box provided
pantera1 [17]

Explanation:

The second for loop does 1 of 4 iterations for every 1 of 5 iterations of the parent loop. meaning it is 4 x 5 which is 20.

8 0
2 years ago
During which part of geologic time were dinosaurs most common?
ANTONII [103]
The answer is C. Jurassic.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following best explains why some people invest their saving in the stock market and others put their saving in bank
    5·2 answers
  • The Transmission Control Protocol (TCP) splits each message into multiple packets. It's possible for packets from the same messa
    10·1 answer
  • How can I collect tweets from different accounts concurrently and categorize the tweets in a corpus?
    15·1 answer
  • Where could an identity thief access your personal information?
    13·1 answer
  • The set of rules for how computers talk to one another
    6·1 answer
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • You wouldn't think a simple shop like Dippy Donuts would be an interesting target for hackers. But look beyond the donuts and yo
    7·1 answer
  • Explain the functions of a VDU?
    6·1 answer
  • HELP PLZZZZZZZZ!!!!!!!!!!!
    14·1 answer
  • Question #5
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!