Quote
Can you write overloaded min functions. One function will return the minimum of two integers, the second function will return the minimum of 3 integer values.
*****Hint: see if you can use the two argument min function for the three argument min function******
Notes: This means you need two functions called min
*****Hint: see if you can use the two argument min function for the three argument min function******
Notes: This means you need two functions called min
well for someone reason, im not sure on how to fund the min on the values? are if statements the best?
done one similar,
#include <iostream>
using namespace std;
int addEm(int a, int b, int c);
int addEm(int a, int b);
int main()
{
int x,y,z;
cout << "Enter 3 integers " << endl;
cin >> x >> y >> z;
cout << "The sum of the first two is " << addEm(x, y) << endl;
cout << "The sum of all Three is " << addEm(x, y, z) << endl;
}
int addEm(int a, int b)
{
return a + b;
}
int addEm(int a, int b, int c)
{
return a + b + c;
}
so im just not sure what you think the best way is to find the mins are?
thanks guys for any help, rep will be given!


Sign In
Create Account


Back to top









