高等继续教育 / VisualBasic程序设计
正确率:100%
题型描述: 单选题
如果a为奇数且a的绝对值小于100,则打印“ok”,否则打印“Error”,表示这个条件的单行格式If语句是( )。
A.If Int(a/2)=a/2 And Abs(a)<100 Then Print "ok" Else Print "Error"
B.If Int(a/2)<>a/2 And Abs(a)<100 Then Print "Error" Else Print "ok"
C.If a Mod 2=0 And (a>=100,a<=-100) Then Print "ok" Else Print "Error"
D.If a Mod 2<> 0 And a<100 And a>-100 Then Print "ok" Else Print "Error"
如果a为奇数且a的绝对值小于100,则打印“ok”,否则打印“Error”,表示这个条件的单行格式If语句是( )。
A.If Int(a/2)=a/2 And Abs(a)<100 Then Print "ok" Else Print "Error"
B.If Int(a/2)<>a/2 And Abs(a)<100 Then Print "Error" Else Print "ok"
C.If a Mod 2=0 And (a>=100,a<=-100) Then Print "ok" Else Print "Error"
D.If a Mod 2<> 0 And a<100 And a>-100 Then Print "ok" Else Print "Error"
参考答案:
佳题速递: