递归求1!+~+10!的和
public class Di {
public static void main(String[] args) {
// TODO Auto-generated method stub
int count=1;
int sum=0;
for(int i=1;i<=10;i++) {
count=count*i;
sum=sum+count;
}
System.out.println(sum);
}
}
运行结果: