int factorial(int n) { if(n<0) return -1; if(n==0 || n==1) return 1; return n * factorial(n-1); }
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)