From a7d39aa736add1fa82a03508691809247da08604 Mon Sep 17 00:00:00 2001 From: flykhan Date: Tue, 20 Jun 2023 08:51:57 +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=A4=A7?= =?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/h8.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 day6/homework/h8.cpp diff --git a/day6/homework/h8.cpp b/day6/homework/h8.cpp new file mode 100644 index 0000000..5c0df10 --- /dev/null +++ b/day6/homework/h8.cpp @@ -0,0 +1,15 @@ +#include + +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; +} \ No newline at end of file