You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
149 B
16 lines
149 B
3 years ago
|
static int
|
||
|
fact(int n)
|
||
|
{
|
||
|
if (n == 0 || n == 1) {
|
||
|
return(1);
|
||
|
}
|
||
|
return(n * fact(n - 1));
|
||
|
}
|
||
|
|
||
|
int
|
||
|
main(void)
|
||
|
{
|
||
|
int result = fact(5);
|
||
|
return(0);
|
||
|
}
|