do max and min coding?
Printable View
do max and min coding?
Are you talking about a function that will take some numbers, compare them, and tell you which one is the maximum or minimum of the set?
Write a program in C++ that takes three int values interactively
from the user and prints them in ascending order.
Moved to C++ programming forum.
You should #include <algorithm> and <vector>, read the numbers into a std::vector, then std::sort and print them. If the number of numbers is fixed at three, a little swapping as in bubble sort will suffice.