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

Mitchell is a big coffee fan, so he always takes care of coffee brewing at the office. Normally he uses 100 grams of Robusta coffee to prepare 10 cups of coffee
Which number is a factor of 16, but not a multiple of 4? A. 6 B. 10 C. 8 D. 2
what percent of 90 is 22.5?
th civil rights act of 1960 created
Convert 72°F to °C (to the nearest tenth) using one of the following formulas: F = 9/5xC + 32 or C = (F - 32) x 5/9.
Heather has a mobile app she wants people to keep using once they’ve downloaded it. how can she make it more engaging?
100 pens cost x dollars. how many pens can be purchased for 50 cents, assuming the same rate?
the subject is rational exponents and radicals
Which section of a narrative reveals theme? Climax Exposition Resolution Rising action
Stocks and bonds providing income through dividends and interest is the same as money used as which of these?