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
An employee at your graphic design firm needs a solid computer that can handle the variety of graphics and animations he works w
olganol [36]

Answer:

I would say the gaming media because the computer runs better.

Explanation:

Please mark brainlest I beg of you.

3 0
3 years ago
Read 2 more answers
The most infuential programming language is ______.
Oksi-84 [34.3K]

Answer: the most influential programming language is Java script

Explanation:

3 0
4 years ago
A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called
MissTica
<span>A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called a bond</span>
6 0
3 years ago
An identifier that is prefixed with an @ and allows you to use code written in other languages that do not have the same set of
Nina [5.8K]

Answer:

Verbatim Identifier

Explanation:

  • Verbatim Identifier contains @ symbol as a prefix by which enables you to use reserved words of a programming language as identifier. For example the keywords like int, double, goto, char, else, while, for, float etc can be used as strings or variable names if @ symbol is added before these words e.g. @char, @while, @void, @int etc.
  • The compiler of a language will recognize such identifiers as verbatim identifiers and compiles them without giving an error that these are reserved words.
  • Verbatim identifier is used for program that is written in other languages and those languages don't have same reserved words.
  • For example: cout<<"use of verbatim identifier";<<@for;   In this statement, for keyword which is used in for loop can be used as an identifier with @ in the prefix.
  • The escape sequences if used with @ symbol in prefix then they are interpreted in a different way. For example in C#

                              string a = "\\C:\torrent\new\file";

                              Console.WriteLine(a);

This statement will give the following output:

                              \C:          orrent

                               ewfile

This means that the \t in the start of torrent and \n in the start of new word is taken as an escape sequence and output displayed is giving tab space because of \t and prints the rest of the words in new line because of \n escape sequence.

Now lets use this with the @ symbol

                               string a = @"\\C:\torrent\new\file";

                                Console.WriteLine(a);

The output will now be:

                                \\C:\torrent\new\file

\t and \n are not taken as escape sequences by the compiler because of @ symbol.

4 0
3 years ago
taking small bits of information from the internet/web and using it as my own work or to complete an assignment is plagiarism.
lana66690 [7]
Not necessarily, if you are sourcing the information you have used to come to your own conclusion then that isn't plagiarism, however if you just copy paste completely and use it as your own work then yes it is plagiarism.  <span />
7 0
3 years ago
Other questions:
  • Suppose you are the security manager of a company and one of your goals is to design security mechanisms based on three security
    10·1 answer
  • Each​ _____ in a relational database table is a unique record of something that users want to track.
    14·1 answer
  • Before a computer can store a real number in memory, it must be encoded in __________.
    14·1 answer
  • A switch has just arrived from Cisco. The switch has never been configured with any VLANs, but VTP has been disabled. An enginee
    13·1 answer
  • How do you mark someone brainliest? The person with the best explanation gets brainliest.
    11·2 answers
  • Realizaţi un eseu cu titlul Extinderea domeniului de măsurare la ampermetre
    15·1 answer
  • For (int j- 4; j &gt; 0; j--)
    9·1 answer
  • Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
    9·1 answer
  • Which tool is used to see the wireless networks in a given area?
    5·1 answer
  • I need help ASAP which option is an example of a resource that would most likely become a constraint in building a game
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!