19 lines
191 B
Plaintext
19 lines
191 B
Plaintext
int fact(int n)
|
|
{
|
|
int result;
|
|
if (n == 0) {
|
|
result = 1;
|
|
} else {
|
|
result = n * fact((n - 1));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
puts("\n");
|
|
puti(fact(12));
|
|
puts("\n");
|
|
return 0;
|
|
}
|