- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string student[5]={"甲","乙","丙","丁","戊"};
- string subject[5]={"國","英","數","物","化"};
- int array[5][5]={{60,61,62,63,64},
- {31,32,33,34,35},
- {61,62,63,64,65},
- {41,42,43,44,45},
- {36,37,38,39,49}};
- int j;
- int i;
- cout << "請問要調出哪一位同學的成績表" << endl;
- cin >> j;
- cout << "請問要調出哪一科的成績" ;
- for(int x = 0; x < 5; x++)
- {
- cout << x + 1 << ":" << subject[x];
- }
- cin >> i;
- cout << "請問你要改幾分" ;
- int z;
- cin >> z;
- array[j-1][i-1]=z;
- for(int c=0;c<5;c++)
- {
- cout<<" "<<c+1<<" "<<student[c]<<" ";
- for(int d=0;d<5;d++)
- {
- cout<<" "<<array[c][d]<<"\t";
- }
- cout<<endl;
- }
-
- system("pause");
- return 0;
- }
複製代碼 |