//main.cpp
int max(int, int); //prototype
main()
{
int m, n;
do {
cin >> m >> n;
cout << max(m,n) << endl;
} while (m != 0);
}
//new file, named max.cpp
//returns the larger of the two given integers:
int max(int x, int y)
{
if (x < y) return y;
else return x;
}
|