There was an error while loading. Please reload this page.
2 parents ae6d968 + bd00cc8 commit 06e0ab9Copy full SHA for 06e0ab9
Factorial_Finder.sh
@@ -0,0 +1,9 @@
1
+#!/usr/bin/env bash
2
+echo -n "Enter number: "
3
+read -r a
4
+fact=1
5
+while [ "$a" -ne 0 ]; do
6
+fact=$((fact * a))
7
+a=$((a - 1))
8
+done
9
+echo $fact
0 commit comments