如果x小于y的平方,则在窗体上输出"OK"。完成该要求的单行条件语句是( )。
A、 If x< y ^ 2 Then "OK"
B、 If x< y ^ 2 Then Show "OK"
C、 If x< y ^ 2 Then Print "OK"
D、 If x< y ^ 2 Then Put "OK"
第1题:
如果x为整数且|x|>=100,则打印“OK”,否则打印“Error”,表示这个条件的单行格式 If语句是
A.If Int((x)=x And Sqr(x)>=100 Then Print "OK" Else Print "Error"
B.If Fix(x)=x And Abs(x)>=100 Then Print"OK"Else Print"Error"
C.If Int(x)=x And (x>=100,x<=-100)Then Print"OK"Else Print"Error"
D.If Fix(x)=x And x>=100 And x<=-100 Then Print "OK" Else Print "Error"
第2题:
运行下列程序:
Private Sub form_Click( )
x = 8: y = 2
Call fun1((x), y)
Print x, y
End Sub
Private Sub fun1(x, y)
s = x
x = s / y
y = s Mod y
End Sub
单击窗体后,则在窗体上显示的结果是( )。
A.4 2
B.8 2
C.8 0
D.2 4
第3题:
用Which语句写出判断成绩的函数,要求输入x,当x大于等于90输出A;当x大于等于80小于90输出B;当x大于等于70小于80输出C;当x大于等于60小于70输出D;当x小于60输出F。
第4题:
设有如下程序:
Prirate Sub Form_Click()
Dim a As Integer,b AS Integer
a=20:b=50
p1 a,b
p2 a,b
p3 a,b
Print"a=";a,"b=";b
End Sub
Sub p1(x As Integeh By Val y As Integer)
x=x+10
y=y+20
End Sub
Sub p2(ByVal x As Integer,y As Integer)
x=x+10
y=y+20
End Sub
Sub p3 (ByVal x As Integer,ByVal y As Integer)
x=x+10
y=y+20
End Sub
该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。
第5题:
运行下列程序:
Dim b
Private Sub Form_Click( )
a = 1: b = 1
Call fun1(a)
Print "X = "; a; ",Y = "; b
End Sub
Private Sub fun1(a)
b = 2 * a
a = 3 * b
End Sub
单击窗体后,则在窗体上显示的结果是( )。
A.X = 1,Y = 1
B.X = 2,Y = 6
C.X = 6,Y = 2
D.X = 6,Y = 1