• 2022-06-08
    执行下列程序段后,变量y的值为( )。 Dim x As Integer,y As Integer x = 7 y = 3 If x >= 10 Then y = x - y ElseIf x>= 7 Then y = x + y Else y = x End If
    A: 21
    B: 10
    C: 4
    D: 3
  • B
    本题目来自[网课答案]本页地址:https://www.wkda.cn/ask/ppyexoypxxmyoto.html

    内容

    • 0

      有程序段:x:=7;y:=3;x:=x+y;y:=x-y;x:=x-y,执行后,变量x的值是() A: 7 B: 3 C: 10 D: 4

    • 1

      Sub s1(ByVal x As Integer, ByVal y As Integer) Dim t As Integer t = x: x = y: y = t End Sub Sub s2(x As Integer, y As Integer) Dim t As Integer t = x: x = y: y = t End Sub 则以下说法中正确的是( )。

    • 2

      下列程序段的输出结果是_____。 x = 10 if x > 5: y = 2 * x elif x > 3: y = 3 * x elif x > 1: y = 4 * x else: y = x print(y)

    • 3

      有如下事件程序,运行该程序后输出结果是。 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

    • 4

      下面哪些定义是类型正确的? 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