From 444fe47220e20540f7f69491a000d3bc2e724f26 Mon Sep 17 00:00:00 2001 From: Ericning Date: Wed, 21 Oct 2020 20:48:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?29021=20755201=20=E5=AF=A7=E5=AE=B6?= =?UTF-8?q?=E6=A5=A8=20=E9=8C=A2=E5=8C=85app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 755201/755201 290 21.cpp | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 755201/755201 290 21.cpp diff --git a/755201/755201 290 21.cpp b/755201/755201 290 21.cpp new file mode 100644 index 0000000..bfe1419 --- /dev/null +++ b/755201/755201 290 21.cpp @@ -0,0 +1,51 @@ +#include +using namespace std; +int main() { + float money; + + do { + cout << "¿é¤Jª÷ÃB"; + cin >> money; + } + while (money <= 0); + + int money1 = money * 10, time = 0; + + while(money1 >= 10000) { + money1 -= 10000; + time++; + } + while(money1 >= 5000) { + money1 -= 5000; + time++; + } + while(money1 >= 1000) { + money1 -= 1000; + time++; + } + while(money1 >= 500) { + money1 -= 500; + time++; + } + while(money1 >= 100) { + money1 -= 100; + time++; + } + while(money1 >= 50) { + money1 -= 50; + time++; + } + while(money1 >= 10) { + money1 -= 10; + time++; + } + while(money1 >= 5) { + money1 -= 5; + time++; + } + while(money1 >= 1) { + money1 -= 1; + time++; + } + cout << time; +} From 9c078ee15d2261cf18cb20039243cb98c8cd4259 Mon Sep 17 00:00:00 2001 From: Ning1120 <71584065+Ning1120@users.noreply.github.com> Date: Wed, 21 Oct 2020 20:55:18 +0800 Subject: [PATCH 2/4] Update 755201 290 21.cpp --- 755201/755201 290 21.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/755201/755201 290 21.cpp b/755201/755201 290 21.cpp index bfe1419..00b8dab 100644 --- a/755201/755201 290 21.cpp +++ b/755201/755201 290 21.cpp @@ -4,7 +4,7 @@ int main() { float money; do { - cout << "¿é¤Jª÷ÃB"; + cout << "輸入金é¡: "; cin >> money; } while (money <= 0); From 35e70d9d4b80ea02fa5a3a504b251f01611bce30 Mon Sep 17 00:00:00 2001 From: Ning1120 <71584065+Ning1120@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:45:35 +0800 Subject: [PATCH 3/4] Update 755201 290 21.cpp --- 755201/755201 290 21.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/755201/755201 290 21.cpp b/755201/755201 290 21.cpp index 00b8dab..8db5c80 100644 --- a/755201/755201 290 21.cpp +++ b/755201/755201 290 21.cpp @@ -11,39 +11,39 @@ int main() { int money1 = money * 10, time = 0; - while(money1 >= 10000) { + while (money1 >= 10000) { money1 -= 10000; time++; } - while(money1 >= 5000) { + while (money1 >= 5000) { money1 -= 5000; time++; } - while(money1 >= 1000) { + while (money1 >= 1000) { money1 -= 1000; time++; } - while(money1 >= 500) { + while (money1 >= 500) { money1 -= 500; time++; } - while(money1 >= 100) { + while (money1 >= 100) { money1 -= 100; time++; } - while(money1 >= 50) { + while (money1 >= 50) { money1 -= 50; time++; } - while(money1 >= 10) { + while (money1 >= 10) { money1 -= 10; time++; } - while(money1 >= 5) { + while (money1 >= 5) { money1 -= 5; time++; } - while(money1 >= 1) { + while (money1 >= 1) { money1 -= 1; time++; } From a76c499d6d4738587b7c7f98730ef946f5e28bfa Mon Sep 17 00:00:00 2001 From: Ning1120 <71584065+Ning1120@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:47:02 +0800 Subject: [PATCH 4/4] Update 755201 290 21.cpp --- 755201/755201 290 21.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/755201/755201 290 21.cpp b/755201/755201 290 21.cpp index 8db5c80..a6f90be 100644 --- a/755201/755201 290 21.cpp +++ b/755201/755201 290 21.cpp @@ -7,7 +7,7 @@ int main() { cout << "輸入金é¡: "; cin >> money; } - while (money <= 0); + while (money <= 0 || 10 * money != int(10 * money)); int money1 = money * 10, time = 0;