13 lines
132 B
Plaintext
13 lines
132 B
Plaintext
int fact(int x) {
|
|
int ret = 1;
|
|
while(x > 1) {
|
|
ret = ret * x;
|
|
x = x - 1;
|
|
};
|
|
return ret;
|
|
}
|
|
|
|
int main() {
|
|
fact(5);
|
|
}
|