PRIVATE SUB FORM_CLICK( )
X=3 : Y=12
IF X>2 THEN Y=3
Y=5
PRINT Y
END SUB
X=val(inputbox(“shuru”))
IF X>=0 THEN
PRINT SQR(X)
ELSE
PRINT X
END IF
运行时键盘输入-4
DIM X AS INTEGER, Y AS INTEGER
X=VAL(TEXT1.TEXT): Y=VAL(TEXT2.TEXT)
IF X<Y THEN A=X ELSE A=Y
PRINT A
PRIVATE SUB FORM_CLICK( )
A=4
IF A<=3 THEN
B=A
END IF
IF A<=4 THEN
B=A+1
END IF
IF A<=5 THEN
B=A+2
END IF
PRINT A,B
END SUB
PRIVATE SUB FORM_CLICK( )
X=INT(RND)+3
IF X^2>8 THEN Y=X^2+1
IF X^2=9 THEN Y=X^2-2
IF X^2<8 THEN Y=X^3
PRINT Y
END SUB
PRIVATE SUB FORM_CLICK( )
X=100 : Y=30
IF X>Y THEN X=X-Y ELSE X=Y+X
END SUB
PRIVATE SUB FORM_CLICK( )
X=INT(RND)
IF X THEN PRINT X
ELSE PRINT X+1
END SUB
x = 5: y = -20
If Not x > 0 Then x = y - 3 Else y = x + 3
Print x - y; y – x
这段代码的执行结果是( )
PrivateSubCommand1_Click()
n=VAL(Text1.Text)
SelectCasen
Case1To20
x=10
Case2,4,6
x=20
CaseIs<10
x=30
Case10
x=40
EndSelect
Text2.Text=x
EndSub
程序运行后,如果在文本框Text1中输入10,然后单击命令按钮,则在Text2中显示的内容是( )
A=VAL(INPUTBOX(“请输入第一个数”))
B=VAL(INPUTBOX(“请输入第二个数”))
C=VAL(INPUTBOX(“请输入第三个数”))
M=A
IF M>B THEN M=B
IF M>C THEN M=C
PRINT M
END SUB
PRIVATE SUB FORM_CLICK( )
X=INT(RND)+6
SELECT CASE X
CASE IS>5
PRINT 5
CASE IS >4
PRINT 4
CASE IS>3
PRINT 3
CASE ELSE
PRINT 2
END SELECT
END SUB
PRIVATE SUB FORM_CLICK( )
A=VAL(INPUTBOX(“请输入第一个数”))
B=VAL(INPUTBOX(“请输入第二个数”))
T=A
END SUB
PRIVATESUB FORM_CLICK( )
DIM X AS SINGLE
X=VAL(INPUTBOX(“请输入一个成绩”))
SELECT CASE
CASE
PRINT “优”
CASE
PRINT “良”
CASE
PRINT “一般”
CASE
PRINT “及格”
CASE
PRINT “不及格”
END SUB
PRIVATE SUB FORM_CLICK( )
DIM I AS INTEGER,S AS INTEGER
FOR I= 2 TO 100
S=S+
NEXT I
PRINT S
END SUB
Private Sub Command1_Click( )
X=Val(Text1.Text)
Select Case X
Case
Print “出错”
Case Is<0
Y=100-X
Case 0 To 100
Y=100+X
Case
Y=400
End Select
Text2.Text=X
End Sub
PRIVATE SUB FORM_CLICK( )
DIM X AS SINGLE, Y AS INTEGER
X=VAL(TEXT1.TEXT)
IF X>=1000 THEN
Y=5
Y=4
Y=3
Y=2
Y=1
Y=0
END IF
PRINT “Y=”;Y
END SUB
DIM A AS INTEGER, B AS INTEGER
DIM C AS INTEGER
A= VAL(INPUTBOX(“请输入第一个数”))
B= VAL(INPUTBOX(“请输入第二个数”))
C= VAL(INPUTBOX(“请输入第三个数”))
IF A>B THEN
T=A
A=B
B=T
IF A>C THEN
T=A
A=C
C=T
IF THEN
PRINT A,B,C
PRINT A,C,B
END IF