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