#include using namespace std; void read2(int&, int&); int max(int, int); void writemax(int); int main() { int val1=20, val2=10, maxval; read2(val1, val2); maxval=max(val1, val2); writemax(maxval); return 0; } void read2(int &v1, int &v2) { cout << "Enter the first value: "; cin >> v1; cout << "Enter the second value: "; cin >> v2; } int max(int v1, int v2) { if (v1 >= v2) return v1; else return v2; } void writemax(int mval) { cout << "max is " << mval << endl; }