1 2 3 4 5 6 7 8 9
double fact(int n) { if (n == 1||n==0) { return 1; } else { return n * fact(n - 1); } }