#include // this function computes the larger of two ints // prototype declarations int max(int, int); int main(void) { int a, b, c, d; cout << "Enter a, b, c, d: "; cin >> a >> b >> c >> d; cout << "The largest value is " << max(max(a,b), max(c,d)) << endl; } int max(int m1, int m2) { int larger; cout << "max is called with arguments " << m1 << " " << m2 << endl; if (m1 > m2) larger = m1; else larger = m2; cout << "max is leaving with value " << larger << endl; return larger; }