Monday, October 4, 2010
RECURSIVE PROGRAM TO FIND THE FACTORIAL
public int Factorial(int x)
{
if (x == 1)
{
return x;
}
else
{
return x * Factorial(x - 1);
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment