本帖最後由 鄭繼威 於 2022-10-12 20:52 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int n[8]={30,31,33,32,31,35,28,29};
- string c[8]={"忠","孝","仁","愛","信","義","和","平"};
- for(int i=0; i<8; i++){
- cout<<"5年"<<c[i]<<"班有"<<n[i]<<"人"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |