谢谢
求: 1! + 2! + 3! + 4! + … + n!(n>0)的值 (。Net 实现) --------------------编程问答-------------------- 一个窗口,三个控件textbox1用来输入n,label1,用来显示结果,button1,执行按扭.Public Class Form1
Inherits System.Windows.Forms.Form
'省略自动生成代码
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Integer
Dim a As Integer
Dim b As Integer
Dim x As Int64 = 1
Dim y As Int64 = 0
n = TextBox1.Text
For a = 1 To n
x = 1
For b = 1 To a
x = x * b
Next
y = y + x
Next
Label1.Text = y
End Sub
End Class
补充:.NET技术 , VB.NET