Um.
Private int recur(int X){
if (X==0)
return 1;
else
return X*(X-1);
}
Isn't recursive...
It always returns X*(X-1), so if you give it "5", it will always return 20, not Factorial(5) or 120...
And your loop version doesn't return a factorial either: The factorial version using a loop would be:
int val = 1;
while (X > 0)
{
val *= X--;
}