试题

试题 试卷

logo

题型:单选题 题类:常考题 难易度:困难

浙江省“七彩阳光”新高考研究联盟2019-2020学年高三上学期信息技术期中联考试卷

有如下 VB 程序段:

Function fact(n As Integer) As String

If n = 1 Then

    fact = fact & 1

Else

    fact = fact(n \ 2) & n Mod 2

End If

End Function

Private Sub Command1_Click()

Dim x As String, i As Integer, r As Integer

x = Text1.Text

For i = 1 To Len(Text1.Text)

If Mid(x, i, 1) = "." Then Exit For Next i

r = Val(Mid(x, i + 1, Len(Text1.Text) - i)) Text2.Text = fact(r)

End Sub

在文本框Text1中输入2019.70,则执行程序段,在文本框Text2中显示的内容是(  )

A、1000110 B、70 C、350 D、100011
举一反三
返回首页

试题篮