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

Allen is a guitar player who hopes to play in a band one day. What would be the best example of an artifact for Allen?
Why are some pots and pans designed with wooden handles? Wood is a conductor. Wood has a high heat capacity. Wood is an insulator. Wood is an organic substance.
what were some of the enduring achievement of the inca empire
Why does fantasy appeal to normal people
What could result from regular participation in sports and exercise?
1. A fact cannot be proven without dispute true false 2. An Opinion can be proven without dispute true false 3. A fact has no Proof true false 4. Depersonaliza
In the scale used on a blueprint, 1/4 inch represents 3 feet. On the blueprint, what is the length of a room with an actual length of 24 feet.
What are the main ideas of physical science
These 5 questions... 20 points! Give answers to all 5!! Thanks!
Please help! 25 points! Compound intrest!!! Latrice invested $500 at 8% interest compounded annually.? ? How much interest does she earn in 2 years? $83.20 $80.