阶乘
java50以内的阶乘代码
代码如下:
package day10;
import java.math.BigInteger;
public class TestBiginteger {
public static void main(String[]args){
BigInteger num1 = new BigInteger("1");
for(int i=1;i<=50;i++){
BigInteger c = new BigInteger(""+i);
num1=num1.multiply(c);
}
System.out.println(num1);
}
}
只相信苦尽甘来