- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string name[5]={"王小明","大張郎","王小安","邱裕仁","張好醜"};
- float score[5][3]={{97,85,85},
- {74,78,83},
- {81,95,81},
- {79,97,75},
- {87,85,95}};
- cout<<"座號\t姓名\t\t國文\t英文\t數學\t"<<endl;
- cout<<"============================================"<<endl;
- for(int i=0; i<=4; i++)
- {
- cout<<i+1<<"\t"<<name[i]<<"\t\t";
- for(int j=0; j<=2; j++)
- {
- cout<<score[i][j]<<"\t";
- }
- cout<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |