窗体上有1个名称为Command1的命令按钮,事件过程如下:Private Sub Command1_Click()Dim num As Integer, x As Integernum = Val(InputBox("请输入一个正整数"))Select Case numCase Is > 100x = x + numCase Is < 90x = numCase Elsex = x * numEnd SelectPrint x;End Sub运行程序,并在三次单击命令按钮时,分别输入正整数60、80和100,则在窗体上显示的内容为______。
查看答案
运行下面程序,如果输入80,则输出结果是_____。Dim a As Integer, i As Integera = InputBox("input a:")If a > 60 Then i = 1If a > 70 Then i = 2If a > 80 Then i = 3If a > 90 Then i = 4Print "i="; i
编写如下程序Private Sub Command1_Click()Dim x As String, y As Stringx = Right("abcdef", 2)y = Mid("dcbaef", 3, 3)If x > y ThenPrint x + yElsePrint y + xEnd IfEnd Sub程序运行后,单击命令按钮Command1,输出结果为______。
执行下面程序段,如果运行时输入6,则在窗体上输出结果是______。Dim x As Integerx = InputBox("input x")If x > 1 Theny = x + 2ElseIf x < 10 Theny = x + 3ElseIf x = 6 Theny = xEnd IfPrint y
Private Sub Command1_Click()m = -5.4If Sgn(m) Thenn = Int(m)Elsen = Abs(m)End IfPrint nEnd Sub