From 485b93466b858f10654a6e8e28cd884392169734 Mon Sep 17 00:00:00 2001 From: flykhan Date: Tue, 20 Jun 2023 08:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=80=BB=E8=BE=91=E8=BF=90?= =?UTF-8?q?=E7=AE=97=E7=AC=A6=E5=AE=9E=E7=8E=B0=E4=BB=A5=E4=B8=8B=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=EF=BC=9A=E8=BE=93=E5=85=A5=E4=B8=89=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E8=BE=93=E5=87=BA=E5=85=B6=E4=B8=AD=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day6/homework/h9.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 day6/homework/h9.cpp 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