13 lines
160 B
Text
13 lines
160 B
Text
|
int factloop (int n) {
|
||
|
int r = 1;
|
||
|
while (n > 0) {
|
||
|
r = n * r;
|
||
|
n = n - 1;
|
||
|
}
|
||
|
return r;
|
||
|
}
|
||
|
|
||
|
void main () {
|
||
|
puti(factloop(10));
|
||
|
}
|