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

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

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

  1. (10%) What result will you get after running the following code display?
    10 SUM = 0
    20 I = 1
    30 DO WHILE I < 20
    40 I = I + 1
    50 SUM = SUM + I
    60 LOOP
    70 PRINT SUM





  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 A=3 , B=4
    20 PRINT A, B
    30 IF A=3 THEN PRINT "HELLO"




  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 RESTORE 140
    20 DIM A(9)
    30 FOR I = 1 TO 9
    40 READ A(I)
    50 NEXT I
    60 FOR I = 1 TO 9
    70 PRINT A(I); " | ";
    80 FOR J = 1 TO A(I)
    90 PRINT "*";
    100 NEXT J
    110 PRINT
    120 NEXT I
    130 END
    140 DATA 1,3,5,7,9,2,4,6,8,0