BlueToadGaming BlueToadGaming
  • 06-12-2021
  • Computers and Technology
contestada

I need an If else statement that sorts three numbers from a file from least to greatest

Respuesta :

Talanat
Talanat Talanat
  • 06-12-2021
void sort3(int& a, int& b, int& c)
{
if (a > b)
{
std::swap(a, b);
}
if (b > c)
{
std::swap(b, c);
}
if (a > b)
{
std::swap(a, b);
}
}
Answer Link

Otras preguntas

Determine the molecular formula of a compound having the empirical formula C9H17O and a molar mass of 847.56g/mol.
The study of the evolutionary relationships among organisms is called
Discuss two ways in which dramatic tension is built during the trial in to kill a mocking bird
10. (3 pt) Which term correctly describes President Abraham Lincoln's attitude toward Reconstruction? A. reconciliation B. retaliation C. retribution D. re
Harrison has increased levels of the neurotransmitter dopamine in his prefrontal cortex and fluid-filled areas in his brain. which disorder might he be at risk
A major goal of the Cultural Revolution in China during the 1960s was to
(15 points! Answer Asap) Please help with this question from Walk Two Moons.
Which accounting principle requires that information in financial statements shouldn’t mislead the company’s investors?
Which of the following statements about nuclear power is true? A. Nuclear power plants are cheap to build, but expensive to operate. B. Nuclear power plan
The present day island of _______ was settled by the Vikings.