- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a[5][3]={{43,55,77},
- {76,77,43},
- {78,11,22},
- {43,89,88},
- {98,44,67}};
- string b[5]={"王大明","李大頭","蘇小安","余美美","張醜醜"};
- cout<<"座號\t姓名\t國文\t英文\t數學"<<endl;
- cout<<"====================================="<<endl;
-
-
-
- for(int i=0;i<=4;i++)
- {
- cout<<i+1<<"\t";
- cout<<b[i]<<"\t";
- for(int j=0;j<=2;j++)
- {
- cout<<a[i][j]<<"\t";
- }
-
- cout<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |