#include<iostream>
using namespace std;
int main() {
int a, b, c, max;
cout << "请输入a的值" << endl;
cin >> a;
cout << "请输入b的值" << endl;
cin >> b;
cout << "请输入c的值" << endl;
cin >> c;
if (a > b)
{
max = a;
}
else
{
max = b;
}
if (max<c)
{
max = c;
cout << "最大值是:" << c << endl;
}
else
{
cout << "最大值是:" << max << endl;
}
}
输入a,b,c三个数,先a和b比较大小,得到的比较大的数再去和c比较大小,确定出最后的最大值