using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace _1111111111
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
long k = 1;
long m = Convert.ToInt64(textBox1.Text);
for (int i = 1; i <= m; i++)
{
k *= i;
}
textBox2.Text = k.ToString();
}
}
}
工程在附件里边。希望对你有帮助
button1_click()
{
long k=1;
int m=int.phrase(textbox1.text);
for(int i=1;i<=m;i++)
{
k*=i;
}
textbox2.text=k.tostring();
}
可能有些写错的,大概就这个意思了