diff options
Diffstat (limited to 'benchmark/other-lang/fact.pl')
-rw-r--r-- | benchmark/other-lang/fact.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/benchmark/other-lang/fact.pl b/benchmark/other-lang/fact.pl index 2cef18534c..a9b0b69cdf 100644 --- a/benchmark/other-lang/fact.pl +++ b/benchmark/other-lang/fact.pl @@ -1,13 +1,13 @@ -sub fact{
- my $n = @_[0];
- if($n < 2){
- return 1;
- }
- else{
- return $n * fact($n-1);
- }
-}
-
-for($i=0; $i<10000; $i++){
- &fact(100);
-}
+sub fact{ + my $n = @_[0]; + if($n < 2){ + return 1; + } + else{ + return $n * fact($n-1); + } +} + +for($i=0; $i<10000; $i++){ + &fact(100); +} |