期考考試題節錄
|
一、配合題:(每格2分)10%
1( )要多選一的程式語法,較常使用?
…
5(
)背景色BackColor要設為透明的顏色值?
二、真值表:(每格1.5分)21%
運算符號
|
Not
|
And
|
Or
|
Xor
|
|||||||
真值表
|
A
|
NOT
A
|
A
|
B
|
A
And B
|
A
|
B
|
A Or
B
|
A
|
B
|
A Xor
B
|
T
|
|
F
|
F
|
|
F
|
F
|
|
F
|
F
|
|
|
T
|
T
|
|
T
|
T
|
|
T
|
T
|
|
|||
F
|
|
T
|
F
|
|
T
|
F
|
|
T
|
F
|
|
|
F
|
T
|
|
F
|
T
|
|
F
|
T
|
|
三、運算題:寫出下列運算式結果:(每格2分)40%
01. Debug.Print(5 + 2 * 3)
|
11.Debug.Print(72 + 62 * 3 Mod 45 \ 8)
|
02.Debug.Print(112 \ 4)
|
12.Debug.Print(7 >= 6 * 12 \ 11)
|
… …
|
|
09.Debug.Print("12" + "0.7" - 45)
|
19.Debug.Print(73 + 62 * 3 Mod 55 \ 10)
|
10.Debug.Print(4 & 3 + 5)
|
20.Debug.Print(Not -3 ^ 2 > 2 ^ 3 - 2 * 10 / (81 Mod 15) Or 82
/ 15 <= 83 \ 15)
|
四、看程式寫結果:(每題3分)30%
1下列程式輸入11結果?
Dim A As Integer = TextBox1.Text
Dim B As Short = 1 , C As Short = A
3: If A = 1 Then Goto 8
If A Mod 2 = 0 Then
A /= 2
Else
A=A*3+1
End If
5: B+=1
C+=A
Goto 3
8: Label1.Text = B & “,” & C
|
2下列程式輸入2052結果??
Dim A As Integer = TextBox1.Text
If A Mod 4 = 0 Then
If A Mod 400=0 Then
A=5555
Else If A mod 100=0 Then
A=6666
Else
A=7777
End If
Else
A = A - 3333
End If
Label1.Text = A
|
5下列程式輸入A=5,B=4,C=3結果?
Dim A As Integer = TextBox1.Text
Dim B As Integer = TextBox2.Text
Dim C As Integer = TextBox3.Text
If A>B Then
A
= B+C
Else
A
= B-C
A
= A*2
End If
Label1.Text = A
|
6下列程式輸入A=4,B=3結果?
Dim A As Integer = TextBox1.Text
Dim B As Integer = TextBox2.Text
If A<B Then
A
= A+2
Else
A
= A+1
End If
A = A*B
Label1.Text = A
|
…