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

write 30/5 as a whole number
£9.00 is shared between Amanda, Anita and Claire in the ratio of 8:5:2 Amanda receives........ Anita receives........ Claire receives........
multiplying polynomials(3m-1)(8m+7)
1 . The lengths of the legs of a right triangle are 25 cm and 60 cm. What is the length of the hypotenuse?A. 42.5
multiplying polynomials(3m-1)(8m+7)
A substance releases heat when it changes from a. liquid to solid b. solid to gas c. liquid to gas d. solid to liquid
Describe the range of a square root function
what is the measure of the amount of water in the air
What is the stretchy storage bag in the digestive track
Spawning is when a a. large group of adults release their gametes into the water at the same time. b. male and female fish release their gametes together. c. mal