• 2022-10-24
    下面哪些定义是类型正确的?
    A: f :: (Integer, Integer) - Floatf (x,y) =x / y
    B: f :: (Integer, Integer) - Floatf (x,y) = (fromInteger x) / (fromInteger y)
    C: f :: (Integer, Integer) - Floatf (x,y) = 3*x + y
    D: f :: (Integer, Integer) - Integerf (x, y) = 3*x + y
  • B,D

    内容

    • 0

      有如下事件程序,运行该程序后输出结果是。 Private Sub Command33_Click() Dim x As Integer, y As Integer x = 1: y = 0 Do Until y <= 25 y = y + x * x x = x + 1 Loop MsgBox "x=" & x & ", y=" & y End Sub

    • 1

      窗体上有标签(Label1、Label2)和命令按钮(Command1),编写如下事件过程: Private x As Integer: Private Sub Command1_Click(): Dim x As Integer, y As Integer: x = 5: y = 3: proc x, y: Label1.Caption = x: Label2.Caption = y: End Sub: Private Sub proc(ByVal a As Integer, b As Integer): x = a + b: b = b * b: End Sub:运行后,单击按钮,Label1和Label2将分别显示

    • 2

      编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______

    • 3

      若有如下代码:<br/>Dim x,y,z As Integer<br/>则以下关于这段代码的叙述中正确的是____。 A: x,y,z被定义为Integer类型变量 B: x,y,z被定义为变体类型变量 C: x,y被定义为Integer类型变量 D: z被定义为Integer类型变量

    • 4

      设有如下通用过程,在窗体上画一个名称为command1的命令按钮,然后编写如下事件过程: private sub command1_click() dim x as integer x=10 y=5 y=f(x) print x;y end sub public function f (x as integer) dim y as integer x=20 y=2 f=x*y end function 程序运行后,如果单击命令按钮,则在窗体上显示的内容是()