Skip to content

Commit 06e0ab9

Browse files
Merge pull request #12 from CodeMaster7000/CodeMaster7000-patch-1
Create Factorial_Finder.sh
2 parents ae6d968 + bd00cc8 commit 06e0ab9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Factorial_Finder.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)