At Westonci.ca, we connect you with the best answers from a community of experienced and knowledgeable individuals. Find reliable answers to your questions from a wide community of knowledgeable experts on our user-friendly Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

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

Sagot :

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);
}
}
We appreciate your time. Please revisit us for more reliable answers to any questions you may have. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Thank you for visiting Westonci.ca. Stay informed by coming back for more detailed answers.