class FactSum { static int factorial(int n){ if (n <=0) return 1; else return n*factorial(n-1); }; static int doSum(int n){ int s=0; while (n >= 0) { s = s + factorial(n); n=n-1; } return s; } };
class FactSum { static int factorial(int n){ if (n <=0) return 1; else return n*factorial(n-1); }; static int doSum(int n){ int s=0; while (n >= 0) { s = s + factorial(n); n=n-1; } return s; } };