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