科目名稱:資訊系統 與網路導論 | 開課系所:資訊工程 學系 | 任課教師 |
吳坤熹 |
||
系所別: |
年級: |
學號: |
姓名: |
考試日期 |
2010.10.22 |
(考試時間: 10:30-10:45)
(10%) What result will be shown on the screen after you run the following program? Please specify the coordinates of endpoints of each line segment.
NOMAINWIN
WindowWidth=400
WindowHeight=300
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
OPEN "Draw Boxes" FOR GRAPHICS AS #w
PRINT #w, "trapclose [quit]"
PRINT #w, "FILL lightgray"
PRINT #w, "PLACE 20 100; DOWN"
FOR I= 20 to 80 step 20
PRINT #w, "BOX "; 20+I; " "; 100+I
NEXT I
PRINT #w, "FLUSH"
WAIT
[quit]
CLOSE #w
END
(10%) What result will be shown on the screen after you run the following program? Please specify the coordinates of endpoints of each line segment.
WindowWidth=400
WindowHeight=300
UpperLeftX=INT((DisplayWidth-WindowWidth)/2)
UpperLeftY=INT((DisplayHeight-WindowHeight)/2)
OPEN "Draw Boxes" FOR GRAPHICS AS #w
PRINT #w, "FILL lightgray"
PRINT #w, "PLACE 20 100; DOWN"
FOR I= 20 to 80 step 20
PRINT #w, "BOX "; 20+I; " "; 100-I
PRINT #w, "PLACE "; 20+I; " "; 100-I
NEXT I
PRINT #w, "FLUSH"
WAIT