题干

【加试题】设窗体上已经添加了command1、text1、label1对象,当文本框中输入8时下列代码段运行后的结果会是(   )

Private Sub Command1_Click()

Dim s As Integer

Dim n As Integer

Dim i As Integer

n = Val(Text1.Text)

s = 1

For i = 2 To n

  s = s * i

Next i

Label1.Caption = Str(n) + "!=" + Str(s)

End Sub

A:程序有语法错误

B:出现“溢出”错误

C:8!= 4032

D:8!= 40320

上一题 下一题 0.0难度 选择题 更新时间:2019-04-25 12:10:01

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

B