本帖最後由 許婷芳 於 2019-11-29 20:45 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string a[8]={"忠","孝","仁","愛","信","義","和","平"};
- int b[8]={30,31,33,32,31,35,28,29};
- for(int i=0;i<8;i++)
- {
- cout<<"五年"<<a[i]<<"班有"<<b[i]<<"人"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |