From 4f3b04a51905034eeb0932b7446d5e2ee8232c59 Mon Sep 17 00:00:00 2001 From: ryan-0907 <57752983+ryan-0907@users.noreply.github.com> Date: Sun, 5 Apr 2020 14:02:37 +0800 Subject: [PATCH 1/4] 655016.cpp --- 655016.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 655016.cpp diff --git a/655016.cpp b/655016.cpp new file mode 100644 index 0000000..548948e --- /dev/null +++ b/655016.cpp @@ -0,0 +1,54 @@ +#include +using namespace std; +int main() { + int chineseAvg = 0; + int mathAvg = 0; + int scienceAvg = 0; + int englishAvg = 0; + int socialAvg = 0; + + int chinese = 0; + int math = 0; + int science = 0; + int social = 0; + int english = 0; + + cout << "輸入考試人數:"; + int testPeoNum; + cin >> testPeoNum; + int X [testPeoNum][5]; + for (int i = 0; i < testPeoNum; i++) { + cout << "輸入國文成績:"; + cin >> X [0][i]; + chineseAvg += X [0] [i]; + chinese = X [0] [i]; + + cout << "輸入數學成績:"; + cin >> X [1][i]; + mathAvg += X [1] [i]; + math = X [1] [i]; + + cout << "輸入自然成績:"; + cin >> X [2][i]; + scienceAvg += X [2] [i]; + science = X [2] [i]; + + cout << "輸入社會成績:"; + cin >> X [3][i]; + socialAvg += X [3] [i]; + social = X [3] [i]; + + cout << "輸入英文成績:"; + cin >> X [4][i]; + englishAvg += X [4] [i]; + english = X [4] [i]; + + cout << i + 1 << "號平均:" << (chinese + math + science + social + english) /5 << "\n"; + } + cout << "國文總平均:" << chineseAvg / testPeoNum << "\n"; + cout << "數學總平均:" << mathAvg / testPeoNum << "\n"; + cout << "自然總平均:" << scienceAvg / testPeoNum << "\n"; + cout << "社會總平均:" << socialAvg / testPeoNum << "\n"; + cout << "英文總平均:" << englishAvg / testPeoNum << "\n"; + +} From 45bf3ec7c0cc90bc11f034cd608cc64c94a17e4b Mon Sep 17 00:00:00 2001 From: ryan-0907 <57752983+ryan-0907@users.noreply.github.com> Date: Wed, 8 Apr 2020 20:02:41 +0800 Subject: [PATCH 2/4] Delete 655016.cpp --- 655016.cpp | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 655016.cpp diff --git a/655016.cpp b/655016.cpp deleted file mode 100644 index 548948e..0000000 --- a/655016.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include -using namespace std; -int main() { - int chineseAvg = 0; - int mathAvg = 0; - int scienceAvg = 0; - int englishAvg = 0; - int socialAvg = 0; - - int chinese = 0; - int math = 0; - int science = 0; - int social = 0; - int english = 0; - - cout << "輸入考試人數:"; - int testPeoNum; - cin >> testPeoNum; - int X [testPeoNum][5]; - for (int i = 0; i < testPeoNum; i++) { - cout << "輸入國文成績:"; - cin >> X [0][i]; - chineseAvg += X [0] [i]; - chinese = X [0] [i]; - - cout << "輸入數學成績:"; - cin >> X [1][i]; - mathAvg += X [1] [i]; - math = X [1] [i]; - - cout << "輸入自然成績:"; - cin >> X [2][i]; - scienceAvg += X [2] [i]; - science = X [2] [i]; - - cout << "輸入社會成績:"; - cin >> X [3][i]; - socialAvg += X [3] [i]; - social = X [3] [i]; - - cout << "輸入英文成績:"; - cin >> X [4][i]; - englishAvg += X [4] [i]; - english = X [4] [i]; - - cout << i + 1 << "號平均:" << (chinese + math + science + social + english) /5 << "\n"; - } - cout << "國文總平均:" << chineseAvg / testPeoNum << "\n"; - cout << "數學總平均:" << mathAvg / testPeoNum << "\n"; - cout << "自然總平均:" << scienceAvg / testPeoNum << "\n"; - cout << "社會總平均:" << socialAvg / testPeoNum << "\n"; - cout << "英文總平均:" << englishAvg / testPeoNum << "\n"; - -} From a68881b217ec5f224c0628a44a57c417ae6b98db Mon Sep 17 00:00:00 2001 From: ryan-0907 <57752983+ryan-0907@users.noreply.github.com> Date: Wed, 8 Apr 2020 20:06:30 +0800 Subject: [PATCH 3/4] 655016.cpp --- 655016.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 655016.cpp diff --git a/655016.cpp b/655016.cpp new file mode 100644 index 0000000..548948e --- /dev/null +++ b/655016.cpp @@ -0,0 +1,54 @@ +#include +using namespace std; +int main() { + int chineseAvg = 0; + int mathAvg = 0; + int scienceAvg = 0; + int englishAvg = 0; + int socialAvg = 0; + + int chinese = 0; + int math = 0; + int science = 0; + int social = 0; + int english = 0; + + cout << "輸入考試人數:"; + int testPeoNum; + cin >> testPeoNum; + int X [testPeoNum][5]; + for (int i = 0; i < testPeoNum; i++) { + cout << "輸入國文成績:"; + cin >> X [0][i]; + chineseAvg += X [0] [i]; + chinese = X [0] [i]; + + cout << "輸入數學成績:"; + cin >> X [1][i]; + mathAvg += X [1] [i]; + math = X [1] [i]; + + cout << "輸入自然成績:"; + cin >> X [2][i]; + scienceAvg += X [2] [i]; + science = X [2] [i]; + + cout << "輸入社會成績:"; + cin >> X [3][i]; + socialAvg += X [3] [i]; + social = X [3] [i]; + + cout << "輸入英文成績:"; + cin >> X [4][i]; + englishAvg += X [4] [i]; + english = X [4] [i]; + + cout << i + 1 << "號平均:" << (chinese + math + science + social + english) /5 << "\n"; + } + cout << "國文總平均:" << chineseAvg / testPeoNum << "\n"; + cout << "數學總平均:" << mathAvg / testPeoNum << "\n"; + cout << "自然總平均:" << scienceAvg / testPeoNum << "\n"; + cout << "社會總平均:" << socialAvg / testPeoNum << "\n"; + cout << "英文總平均:" << englishAvg / testPeoNum << "\n"; + +} From 2a43440b1cc994d881a9b0f30d4cb6f36ca8172b Mon Sep 17 00:00:00 2001 From: ryan0907 Date: Wed, 8 Apr 2020 20:11:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E655016.cpp=20=E5=AD=B8?= =?UTF-8?q?=E6=B8=AC=E6=88=90=E7=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 655016.cpp => 655016/655016.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 655016.cpp => 655016/655016.cpp (100%) diff --git a/655016.cpp b/655016/655016.cpp similarity index 100% rename from 655016.cpp rename to 655016/655016.cpp