高等继续教育 / 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=a/2 And (a<100 Or 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=a/2 And (a<100 Or a>-100) Then Print "ok" Else Print "Error"
参考答案:
佳题速递: