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
Jet001 [13]
3 years ago
14

Write a programme with C++ language wich print the biggest number in between three numbers , whith INT

Computers and Technology
1 answer:
belka [17]3 years ago
5 0
Your question is a bit misleading, I'm having trouble understanding what you mean with "in between". I'm assuming you want the biggest number from an input of 3 numbers. You did not specify what should happen if more than one number is the biggest (ie., they're equal).

A very naive implementation might be:

void PrintBiggest(int a, int b, int c)
{
   if ((a >= b) && (a >= c)) cout << a;
   else if ((b >= a) && (b >= c)) cout << b;
   else if ((c >= a) && (c >= b)) cout << c;
}

If you want to use STL (mine is a little rusty), the following could be the start of something more generic:

void PrintBiggest(int a, int b, int c)
{
   std::vector<int> myints;
   myints.push_back(a);
   myints.push_back(b);
   myints.push_back(c);
   sort(myints.begin(), myints.end());
   cout << myints.back();
}



You might be interested in
Elsa wants to save her work at the office to be continued at home either on a pen drive or CD. Outline three reasons why she wil
Rzqust [24]

Answer:

More space

Pen drives generally have more storage capacity than CDs with CDs usually having just around 700 Megabytes for storage. Pen drives on the other hand can reach up to 2 Terabytes of data storage capacity. If the file she needs to save is high, Elsa should use the pen drive.

Scratch resistant

CDs can be scratched on the way to the house and lose some data or make it harder to extract. Pen drives do not have such problems are they are encased in an outer casing.

Portable and Accessible.

Pen drives are easy to carry which makes them portable and they are easier to use because a lot of computers do not have a CD drive but every computer has a port for a pen drive therefore making data in pen drives more accessible.

4 0
3 years ago
Which one of these do you need to become president of the US ?
gladu [14]

Answer:

Tbh i dont even know

Explanation:

I had who i wanted to become president but i don't even know anymore

7 0
2 years ago
Read 2 more answers
A level breach of security could be expected to have a severe or catastrophic adverse effect on organizational operations, organ
rewona [7]

Answer:

Option D is correct.

Explanation:

A high-level safety violation could be anticipated to have a serious or disastrous negative impact on organisational activities, organisational assets.

The effect of the violation on an organisation may be staggering, and sometimes unknown until the outcomes are achieved. It is strange that, owing to harmful or neglectful acts, the greatest incidents of compromise come from within the business ; it requires time for an organisation to recover.

8 0
3 years ago
What are the specifications of mine shaft head gear​
svetlana [45]

Answer:

the depth of the shaft,

the carrying load of the skip and the mass of the counterweight,

the approximate size of the winding drum,

the approximate height of the headgear and the sheave wheel

4 0
3 years ago
Read 2 more answers
(b) An online game allows players to race cars. They can play against other people or computer players.
BARSIC [14]

Answer:

Decomposition is when we break a problem down into smaller parts to make it easier to tackle.

Hope this helps I am in high school and I’m gonna work for Apple so I know a lot about computers and electronics

6 0
3 years ago
Other questions:
  • WHAT IS SQL AND HOW CAN YOU MEET THE DATA REQUIREMENTS ALSO MAINTAINING DATA INTEGRITY,AND LASTLY STATE THE FULL MEANING OF SQL
    11·1 answer
  • Decisions 1 and 3 are both ____________ decisions because ____________________.
    9·1 answer
  • Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from great
    8·1 answer
  • THE DOMAIN IN AN EMAIL MESSAGE TELLS YOU THE
    11·1 answer
  • How did the invention of the printing press lead eventually to an increase in the diversity of religious expression?
    7·1 answer
  • Which type of loop is best if you do not know how many times you need the loop to run?
    8·1 answer
  • Implement a java program to find the smallest distance between two neighbouring numbers in an array.
    7·1 answer
  • When you check your hard drive to see how much space is available, you are checking your
    15·1 answer
  • 3.5 code practice question 1
    5·2 answers
  • How has the widespread shift to remote work caused businesses to reconsider their use of Extended Reality (XR)?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!