Google Interview Question

Write an algorithm to calculate n factorial

Interview Answer

Anonymous

Jul 4, 2010

fact(int n) { if(n==0) return ; else return n*fact(n-1); }