- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- int score[5][3]={{90,85,85},
- {90,86,86},
- {90,87,87},
- {90,88,88},
- {90,89,89}};
- string n[5]={"王大明","李大頭","蘇小安","余美美","張醜醜"};
- cout<<"座號\t姓名\t國文\t英文\t數學\t"<<endl;
- cout<<"============================================"<<endl;
- for(int i=0;i<5;i++)
- {
- cout<<i+1<<"\t";
- cout<<n[i]<<"\t";
- for(int j=0;j<3;j++){
- cout<<score[i][j]<<"\t";
- }
- cout<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |