标签:http images idt n的阶乘 实现 blog cli .text log
求
For语句实现
Private Sub Command1_Click() Dim s As Long, n As Integer, i As Integer n = Val(Text1.Text) s = 1 For i = 1 To n s = s * i Next i Label4.Caption = Str(s) End Sub
Do While语句实现
Private Sub Command1_Click() Dim s As Long, n As Integer, i As Integer n = Val(Text1.Text) s = 1 i = 1 Do While i <= n s = s * i i = i + 1 Loop Label4.Caption = Str(s) End Sub
标签:http images idt n的阶乘 实现 blog cli .text log
原文地址:http://www.cnblogs.com/daveylin/p/6944020.html