Sign in
android
/
platform
/
tools
/
idea
/
9b5d02ac8c92b1e71523cc15cb3d168d57fbd898
/
.
/
plugins
/
groovy
/
testdata
/
groovy
/
refactoring
/
inlineMethod
/
fact2.test
blob: ff7345dd8f6324a2730524208e8c1ecfe33408b8 [
file
] [
log
] [
blame
]
int
fact
(
int
n
)
{
if
(
n
>
0
)
return
n
*
<selection>
fact
</
selection
>(
n
-
1
);
else
return
1
;
}
-----
int
fact
(
int
n
)
{
if
(
n
>
0
)
{
int
result
if
(
n
-
1
>
0
)
result
=
(
n
-
1
)
*
fact
(
n
-
1
-
1
);
else
result
=
1
return
n
*
result
};
else
return
1
;
}