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]
2 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]2 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
Which of the following statements is true of a time management plan? It is work in progress that need to be altered many times?
marusya05 [52]
Cake cake cake cake
3 0
3 years ago
What are some common options to sort a mail merge recipient list?
Anni [7]

Answer:

by city

by ZIP code

by last name

4 0
2 years ago
Read 2 more answers
Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
never [62]

Answer:

Following are the code in the C Programming Language.

if(a==0) //set if conditional statement

{

//print the following message

printf("no solution for a=0");

}

Explanation:

Here, we define a function and pass three double data type variable i.e., "a", "b", "c" and then we write the following code inside the function.

  • Set the if conditional statement and check that condition is the variable "a" is equal to 0.
  • Then print message through the "printf()" which display on the screen if the given condition is true.
3 0
3 years ago
What is the aperture of the human eye and why
AveGali [126]

answer to the google

i didn't knew it but i need points

7 0
2 years ago
Dharma opens one window, does a little work, closes the window and then opens a new one. Instead of opening windows, what can Dh
seraphim [82]

Answer:

Make a goal

Explanation:

She could make a goal achieve it and reward herself. Do this multiple times and she will be done

5 0
2 years ago
Other questions:
  • A teacher uses the spreadsheet below to determine the average quiz score of each student. The teacher inserts this information i
    11·2 answers
  • How does microchip work
    12·1 answer
  • Why it’s important to keep the standard internet protocol TCP/IP?
    11·1 answer
  • Technician A says that the ECT and IAT sensors can be tested by using a digital multimeter or a scan tool. Technician B says tha
    12·1 answer
  • Who PLAYS Apex Legend?
    10·2 answers
  • Part 1: For this assignment, call it assign0 Implement the following library and driver program under assign0: Your library will
    5·1 answer
  • What is the best programming language
    9·1 answer
  • What finger should be on the Y key?
    12·2 answers
  • You upgrade a graphics workstation with a HyperThreading-enabled CPU core. You expect the programs on the desktop to run much fa
    12·1 answer
  • How the data is converted into the information?​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!