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 one is the correct answer
STatiana [176]

the right anwser is d


3 0
2 years ago
Research the disadvantages of the computer and explain them.​
lisabon 2012 [21]

Answer:

Too much sitting-affects the back and makes our muscles tight

Carpal tunnel and eye strain-moving your hand from your keyboard to a mouse and typing are all repetitive and can cause injuries

Short attention span and too much multitasking-As you use a computer and the Internet and get immediate answers to your questions and requests, you become accustomed to getting that quick dopamine fix. You can become easily frustrated when something doesn't work or is not answered in a timely matter.

3 0
3 years ago
What is the output from this program? #include void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2
Ostrovityanka [42]

Answer:

  1  35

Explanation:

* There is a little typo in printf. It should be "\n".

Initially, the value of the first is 1, and the value of the second is 2. Then, do_something(&second, first) is called. The value of the <em>first</em> will still be 1. However, there is a call by reference for <em>second </em>variable. That means the change made by the function <em>do_something</em> will affect the value of the <em>second</em> variable.

When you look at the calculation inside the <em>do_something</em> function, you may see that value of the <em>second</em> will be 35.

7 0
3 years ago
Why might a peer-to-peer network not be the best choice for a large corporate office setting?
omeli [17]

Answer:

a it is less private

Explanation:

8 0
3 years ago
32.
qaws [65]

Answer:

a

Explanation:

hackers access your system unauthorized

5 0
3 years ago
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • What are the advantages and disadvantages of malware maintenance?
    12·1 answer
  • What is the benefit to displaying the merge codes in a document?
    9·1 answer
  • How can multiple items be selected at the same time in aJList?
    8·1 answer
  • Ile 1 cm<br> ?<br> 50 m<br> The an
    5·2 answers
  • (PYTHON HOMEWORK)Given the following code snippet, which statement tests to see if all three sets are equal?:
    11·1 answer
  • To protect a computer, it is a good idea to install and frequently run
    6·2 answers
  • Which of the following is a public location that sells Internet access? Internet café Extranet Intranet LogMeIn,
    15·1 answer
  • What is project management? A. Brainstorming ways to plan a project B. Executing, completing, and revising a project C. Managing
    10·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!