From b5eca043a58d9f7f9c6f5ff0286a6dcd5740f9ec Mon Sep 17 00:00:00 2001 From: flykhan Date: Thu, 30 Mar 2023 15:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 第一讲 变量、输入输出、表达式与顺序语句/654.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 第一讲 变量、输入输出、表达式与顺序语句/654.cpp diff --git a/第一讲 变量、输入输出、表达式与顺序语句/654.cpp b/第一讲 变量、输入输出、表达式与顺序语句/654.cpp new file mode 100644 index 0000000..99b4ba2 --- /dev/null +++ b/第一讲 变量、输入输出、表达式与顺序语句/654.cpp @@ -0,0 +1,14 @@ +#include + +int main() +{ + int N; + int h, m, s; + scanf("%d", &N); + h = N / (60 * 60); + m = N % (60 * 60) / 60; + // s = N - h * (60 * 60) - m * 60; + s = N % 60; + printf("%d:%d:%d", h, m, s); + return 0; +}