From 0b07514acb5e3b99a714183b402ea364ba5ef79a Mon Sep 17 00:00:00 2001 From: flykhan Date: Fri, 24 Mar 2023 11:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=9E=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 第一讲 变量、输入输出、表达式与顺序语句/653.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 第一讲 变量、输入输出、表达式与顺序语句/653.cpp diff --git a/第一讲 变量、输入输出、表达式与顺序语句/653.cpp b/第一讲 变量、输入输出、表达式与顺序语句/653.cpp new file mode 100644 index 0000000..e74161e --- /dev/null +++ b/第一讲 变量、输入输出、表达式与顺序语句/653.cpp @@ -0,0 +1,16 @@ +#include + +int main() +{ + int total_money; + scanf("%d", &total_money); + printf("%d\n", total_money); + printf("%d nota(s) de R$ 100,00\n", total_money / 100); + printf("%d nota(s) de R$ 50,00\n", total_money % 100 / 50); + printf("%d nota(s) de R$ 20,00\n", total_money % 100 % 50 / 20); + printf("%d nota(s) de R$ 10,00\n", total_money % 100 % 50 % 20 / 10); + printf("%d nota(s) de R$ 5,00\n", total_money % 100 % 50 % 20 % 10 / 5); + printf("%d nota(s) de R$ 2,00\n", total_money % 100 % 50 % 20 % 10 % 5 / 2); + printf("%d nota(s) de R$ 1,00\n", total_money % 100 % 50 % 20 % 10 % 5 % 2); + return 0; +} \ No newline at end of file