返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int b[5][3]={{90,85,85},
  7.             {70,75,80},
  8.             {80,95,80},
  9.             {70,95,70},
  10.             {80,85,90}};
  11. string a[5]={"王大明\t","李大頭\t","蘇小安\t","余美美\t","張醜醜\t"};
  12. cout<<"座號\t姓名\t\t國文\t英文\t數學"<<endl;
  13. cout<<"============================================"<<endl;
  14. for(int i=0;i<5;i++)
  15. {
  16. cout<<i+1<<"\t"<<a[i]<<"\t";
  17. for(int j=0;j<3;j++)
  18. {
  19. cout<<b[i][j]<<"\t";        
  20. }
  21. cout<<endl;            
  22. }
  23. system("pause");
  24. return 0;   
  25. }
複製代碼

TOP

返回列表