國立暨南國際大學 98 學年度第一學期小考試卷

科目名稱:資訊系統 與網路導論 開課系所:資訊工程 學系 任課教師
吳坤熹
系所別:
年級:
學號:
姓名:
考試日期
2009.9.23

(考試時間: 14:10-14:20)

  1. (10%) What result will you get after running the following code display?
    10 FOR I = 1 TO 5
    20 PRINT I;
    30 NEXT I
    40 PRINT I
    50 END





  2. (10%) Determine whether the following code is correct or not.  If it is correct, predict its output.  If it is incorrect, point out the mistake(s).
    10 K = 4
    20 FOR I = K TO 1 STEP -1
    30 FOR J = 1 TO I
    40 PRINT "*";
    50 NEXT J
    60 PRINT
    70 NEXT I


  3. (10%) Determine whether the following code is correct or not.  If it is correct, predict its output.  If it is incorrect, point out the mistake(s).
    10 SUM = 0
    20 FOR I = 1 TO 100 STEP 2
    30 SUM = SUM + I
    40 NEXT I
    50 PRINT SUM
    60 END