From c9353fa3fe8e051a3779ccdf850667f1dbfe716c Mon Sep 17 00:00:00 2001 From: flykhan Date: Fri, 16 Jun 2023 16:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=B8=80=E4=B8=AA=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E8=83=BD=E5=90=A6=E8=A2=AB3=E6=95=B4=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- day5/d6.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 day5/d6.cpp diff --git a/day5/d6.cpp b/day5/d6.cpp new file mode 100644 index 0000000..13a7614 --- /dev/null +++ b/day5/d6.cpp @@ -0,0 +1,16 @@ +// 测试一个整数能否被3整除 +#include + +using namespace std; + +int main() +{ + unsigned int n; + cout << "请输入一个整数:"; + cin >> n; + if (n % 3 == 0) + cout << "能被3整除" << endl; + else + cout << "不能被3整除" << endl; + return 0; +} \ No newline at end of file