summaryrefslogtreecommitdiff
path: root/examples/functions/fact
diff options
context:
space:
mode:
Diffstat (limited to 'examples/functions/fact')
-rw-r--r--examples/functions/fact2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/functions/fact b/examples/functions/fact
index cd7bf467..97efd498 100644
--- a/examples/functions/fact
+++ b/examples/functions/fact
@@ -9,5 +9,5 @@ fact ()
echo 1
return ;
fi;
- echo $[ $num * $(fact $[ $num - 1 ])]
+ echo $(( $num * $(fact $(( $num - 1 )) ) ))
}