题库 高中信息

题干

有如下程序段:
Function f(a As Integer, b As Integer) As Integer
Dim k As Integer
k = a Mod b
If k = 0 Then
f = b
Else
f = f(b, a mod b)
End If
End Function
Private Sub Command1_Click()
Dim i As Integer, j As Integer
i = Val(Text1.Text)
j = Val(Text2.Text)
Text3.Text = Str(i * j / f(i, j))
End Sub
该程序运行之后,在text1与text2分别输入25 与15,点击command1后在text3上显示的内容为(  )
A.5B.30C.75D.125
上一题 下一题 0.99难度 选择题 更新时间:2019-04-17 09:08:46

答案(点此获取答案解析)