(34) 下面4個CT函數(shù)中是用來判斷用戶輸入的數(shù)是否為奇數(shù)的,是奇數(shù)的返回1,否則返回0,其中正確的是
A) Function CT(ByVal a As Integer)
If a Mod 2=0 Then
Return 0
Else
Return 1
End if
End Function
B) Function CT(ByVal a As Integer)
If a Mod 2=0 Then
CT=0
Else
CT=1
End if
End Function
C) Function CT(ByVal a As Integer)
If a Mod 2=0 Then
CT=1
Else
CT=0
End if
End Function
D) Function CT(ByVal a As Integer)
If a Mod 2=0 Then
Return 1
Else
Return 0
End if
End Function
考生答案: 正確答案: B
相關(guān)推薦:
2009年9月計算機等考二級VB模擬題及解析匯總 在VB中利用遠程數(shù)據(jù)庫的訪問之應(yīng)用舉例