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
The processor itself is not a resource, therefore the OS is not involved in deciding how much of the processor time is used for
photoshop1234 [79]

Answer:

False

Explanation:

In computing, a resource can be defined as a component with limited or varying size/capability. Every computer has a processor whose capability is measured by the number of instructions it can perform in a given unit of time (Clock speed), The number of cores, the size of cache memory and of course the make i.e. AMD or Intel.

One of the functions of the Operating systems in relation to CPU is CPU Scheduling. This is whereby the process manager determines the process to be allocated the resource (CPU) basing on the suitable criteria.

The scheduling criteria is based on:

a. CPU Utilization ensures that the CPU is busy all the time.

b. Throughput is the number of processes that can be executed per unit given time.  

c. Turn Around Time which is the time it takes to get the final output after the process has been allocated the CPU.

d. Waiting Time defined as the length of time a process takes in the ready queue.

e. Response Time defined as the difference in time between the arrival time and the time it starts executing.

The algorithms selected aims at:

1. Maximize CPU utilization

2. Maximize throughput

3. Minimize Turn Around Time, Waiting Time and Response Time

The operating system uses the scheduling criteria to determine the best algorithm to be used to give a number of processes.

These algorithms can be grouped as either preemptive or non-preemptive.

Preemptive means once the process has been allocated to the CPU and can be interrupted before it completes its burst time. Examples include:

a. Round Robin

b. Shortest Remaining Time First (SRTF)

c. Priority Scheduling

Non-preemptive scheduling algorithm works in a way that once a process has been allocated the CPU it cannot be halted or paused until it has completed its burst time. Examples include:

a. First Come First Serve (FCFS)

b. Shortest Job First (SJF)

c. Priority Scheduling

7 0
3 years ago
Read 2 more answers
Assume you're running a query on your orders in the past year. You want to see how many orders were placed after May. What type
vitfil [10]

Your answer is A. Because a query is a question about a an organization to check how it's going


6 0
3 years ago
What is the purpose of system software?
Lilit [14]

The purpose of system software on a computer system is: B. to provide basic operational functionality by coordinating hardware components.

<h3>What is a software?</h3>

A software can be defined as a set of executable instructions that is typically used to instruct a computer system on how to perform a specific task (function) and proffer solutions to a particular problem.

<h3>The types of software.</h3>

Generally, there are three main types of software and these include the following:

  1. Application software
  2. Utility software
  3. System software

In Computer technology, a system software is the most important pre-installed software because it allows an end user to use the computer the first time he or she turns it on, especially by coordinating hardware components. Also, some examples of a system software include the following:

  • Utilities.
  • Search engines
  • Stand-alone operating systems.
  • Real-time operating systems.

Read more on system software here: brainly.com/question/1416480

#SPJ1

6 0
1 year ago
Different between input and output device​
chubhunter [2.5K]

Answer:

An input device is something you connect to a computer that sends information into the computer. An output device is something you connect to a computer that has information sent to it.

Explanation:

8 0
3 years ago
It is a life long skills like spelling, it is a skill of typing data currently and quickly using a computer keyboard
viva [34]
Is this a riddle bro?
6 0
3 years ago
Other questions:
  • SP 800-14, Generally Accepted Principles and Practices for Securing Information Technology Systems, provides best practices and
    12·1 answer
  • If a secret key is to be used as a _________ for conventional encryption a single number must be generated.
    13·1 answer
  • #include
    9·1 answer
  • Define computer ?what is water pollution?<br><br><br>​
    15·1 answer
  • 9.6 Code Practice, this is in Python, I need its quick!
    13·1 answer
  • What is an accessor in Java?
    12·1 answer
  • The Bellman-Ford algorithm for the shortest path problem with negative edge weights will report that there exists a negative cyc
    13·1 answer
  • What is the introduction of an algorithm and programming and how does it work?
    11·1 answer
  • 2. Write the pseudocode to print all multiples of 5 between 10 and 25 (including both<br> 10 and 25)
    11·1 answer
  • What are the three computer components that hold a dangerous amounts of electricity? Even when it’s unplugged.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!