11回目 10月20日の授業内容(2次元配列を使ったデータ処理(整数))


(前半)

2次元配列を使ったデータ処理(整数)

2次元配列の考え方


(後半)表の表示方法

(課題)

アンケート調査


(補足)1次元配列

数学の点数を入れる配列SIEm  英語の点数を入れる配列SIEe

     int SIEm[] = new int[5];             int SIEe[] = new int[5];

  SIEm[0]                 SIEe[0] 
  SIEm[1]                 SIEe[1] 
  SIEm[2]                 SIEe[2] 
  SIEm[3]                 SIEe[3] 
  SIEm[4]                 SIEe[4] 

(補足)2次元配列

数学と英語の点数を入れる配列SIE

   int SIE[] []= new int[5][2];

   SIE[0][0]    SIE[0][1]
   SIE[1][0]    SIE[1][1]
   SIE[2][0]    SIE[2][1]
   SIE[3][0]    SIE[3][1]
   SIE[4][0]    SIE[4][1]