From 6d398d7a9f401711cf5979e7e7b78d5cda2da1f9 Mon Sep 17 00:00:00 2001 From: eden Date: Wed, 7 Oct 2020 21:32:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=AC=E5=8A=9B?= =?UTF-8?q?=E6=AD=90=E4=BD=9C=E6=A5=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\351\246\254\345\212\233\346\255\220.'cpp'" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\351\246\254\345\212\233\346\255\220.'cpp'" diff --git "a/\351\246\254\345\212\233\346\255\220.'cpp'" "b/\351\246\254\345\212\233\346\255\220.'cpp'" new file mode 100644 index 0000000..34d9ac5 --- /dev/null +++ "b/\351\246\254\345\212\233\346\255\220.'cpp'" @@ -0,0 +1,18 @@ +#include +using namespace std; + +int main() { + int height; + cout << "高度: "; + cin >> height; + + for (int i = height; i > 0; i--) { + for (int j = i; j > 0; j--) { + cout << " "; + } + for (int k = height - i + 1; k > 0; k--) { + cout << "#"; + } + cout << "\n"; + } +} From d99db1619a58f36d9ff72892dc52e069bf6a26e0 Mon Sep 17 00:00:00 2001 From: eden Date: Wed, 14 Oct 2020 22:52:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=AA=94=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6\255\220.'cpp'" => "\351\246\254\345\212\233\346\255\220.cpp" | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "\351\246\254\345\212\233\346\255\220.'cpp'" => "\351\246\254\345\212\233\346\255\220.cpp" (100%) diff --git "a/\351\246\254\345\212\233\346\255\220.'cpp'" "b/\351\246\254\345\212\233\346\255\220.cpp" similarity index 100% rename from "\351\246\254\345\212\233\346\255\220.'cpp'" rename to "\351\246\254\345\212\233\346\255\220.cpp" From fe7e9a106f548172936954ccaa6f0fbffbf1b7be Mon Sep 17 00:00:00 2001 From: eden Date: Wed, 14 Oct 2020 22:52:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A8=98=E5=B8=B3?= =?UTF-8?q?=E7=A8=8B=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...30\345\270\263\347\250\213\345\274\217.cpp" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\350\250\230\345\270\263\347\250\213\345\274\217.cpp" diff --git "a/\350\250\230\345\270\263\347\250\213\345\274\217.cpp" "b/\350\250\230\345\270\263\347\250\213\345\274\217.cpp" new file mode 100644 index 0000000..8a5a069 --- /dev/null +++ "b/\350\250\230\345\270\263\347\250\213\345\274\217.cpp" @@ -0,0 +1,18 @@ +#include +using namespace std; + +int main() { + int item = 0; + int money = 0; + int total = 0; + + cout << "有幾筆資料:\n"; + cin >> item; + + for (int i = 0; i < item; i++) { + cout << "請輸入第" << i+1 << "行金額:" ; + cin >> money; + total += money; + } + cout << "總金額為" << total; +}