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

15 lines
261 B
C++

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