返回列表 發帖
  1. public class Ch333333333{
  2.     public static void main(String args[])
  3.     { String title[]={"座號","姓名","國文","英文","數學","平均"};
  4.       String title[]={"1號","2號","3號","4號","5號"};
  5.       int score[][]={{78,89,66},
  6.                     {77,67,34},
  7.                     {90,98,91},
  8.                     {57,59,81},
  9.                     {45,66,92}};
  10.       int avg;
  11.       for(int i=0; i<6; i++)
  12.           System.out.print(title[i]+"\t");
  13.            System.out.println();
  14.            System.out.println("===========================================================");
  15.         for(int i=0; i<5;i++)
  16.         {
  17.             System.out.print((i+1)+"\t"+name[i]+"\t");
  18.             for(int j=0; j<3; j++)
  19.             {
  20.             System.out.println(sore][i][j]+"\t");
  21.             }
  22.         avg=Math.round((float)(score[i][0]+score[i][1]+sore[i][2])/3);
  23.         System.out.println(avg);
  24.     }
  25.   }
  26. }
複製代碼

TOP

返回列表