Home > Net >  How to call the public factorial algorithm?
How to call the public factorial algorithm?

Time:10-01



As shown, to textBox1 is calculated according to different the checkBox, the input values in the textBox2, to calculate the combination number C (n, m)

N=textbox1
M=textbox2

How to call public public void getFactorial ()? thank you

CodePudding user response:

Where getFactorial () defined?
Need to initialize a class, it is in such as
Class A
{
Public int getFactorial (int n)
{
Int result r=1;
For (int I=2; I & lt;=n; I++) r *=I;
return r;
}
}

A. A=new A ();
Int result=al-qeada etFactorial (int. Parse (textBox1. Text));
  •  Tags:  
  • C#
  • Related