diff --git a/day6/homework/h9.cpp b/day6/homework/h9.cpp new file mode 100644 index 0000000..90958d2 --- /dev/null +++ b/day6/homework/h9.cpp @@ -0,0 +1,15 @@ +#include + +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; +} \ No newline at end of file