qfedu-basic-level/day6/homework/h8.cpp

15 lines
261 B
C++
Raw Normal View History

#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cout << "请输入三个数: ";
cin >> a >> b >> c;
int max = a > b ? (a > c ? a : c) : (b > c ? b : c);
cout << "其中最大的数是: " << max << endl;
return 0;
}