/* minmax.cpp Find the minimum, maximum, and average of three numbers. June 29, 2011 Bruce Bolden */ #include #include using namespace std; // Prototypes int Minimum3( int n1, int n2, int n3 ); int Maximum3( int n1, int n2, int n3 ); int Average3( int n1, int n2, int n3 ); int main() { int a, b, c; cout << "Enter a three numbers: " << flush; cin >> a >> b >> c; cout << "Entry Verification: "; cout << setw(5) << a; cout << setw(5) << b; cout << setw(5) << c << endl; int min, max; min = Minimum3( a, b, c ); cout << "min: " << min << endl; return 0; } int Minimum3( int n1, int n2, int n3 ) { int minVal; if( n1 < n2 && n1 << n3 ) minVal = n1; else if( n2 < n1 && n2 << n3 ) minVal = n2; else minVal = n3; } int Maximum3( int n1, int n2, int n3 ) { // similar to Minimum3 } int Average3( int n1, int n2, int n3 ) { // add and divide // should the return type be int? }