View Code of Problem 68

#include<iostream>
using namespace std;
int max(int a, int b)
{
    int z;
    if (a > b)
    {
        z = a;
    }
    else
    {
        z = b;
    }
    return z;
}
int main()
{
    int a,b,c;
    cout << "请输入三个数\n";
    cin >> a >> b >> c;
    cout << "输出最大的数为:";
    cout << max(a, max(b, c));
    return 0;
}

Double click to view unformatted code.


Back to problem 68