1/1! + 2/2! + 3/3! + 4/4! + 5/5! + - - - - - - - + n/n!
Factorial AP
Here is a question for generating a series of factorial upto n terms. The input number of terms is taken from user.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
priyanshu singh2 pointsPosted Jun 17, 2013, 9:08 AM EDT
public void fact(int x) { double fact = 1; int i = 1; while (i < x) { fact += i/(fact * i); i++; } MessageBox.Show(fact.ToString()); } private void button1_Click(object sender, EventArgs e) { int a = int.Parse(textBox1.Text); fact(a); }