本帖最後由 郭哲維 於 2019-9-21 11:39 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a[5][3]={{100,90,75},{70,79,90},{100,100,100},{70,95,95},{30,77,99}};
-
- cout<<"座號\t國文\t數學\t英文"<<endl;
- cout<<"================="<<endl;
-
- for(int i=0;i<5;i++)
- {
- cout<<i+1<<"\t";
- for(int s=0;s<3;s++)
- {
- cout<<a[i][s]<<"\t";
- }
- cout<<endl;
- }
-
- system("pause");
- return 0;
- }
複製代碼 |