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