mirror of
https://github.com/ellysh/bash-programming-from-scratch.git
synced 2026-01-26 07:43:42 +00:00
11 lines
108 B
Bash
11 lines
108 B
Bash
#!/bin/bash
|
|
|
|
result=1
|
|
|
|
for i in $(seq $1)
|
|
do
|
|
((result *= $i))
|
|
done
|
|
|
|
echo "The factorial of $1 is $result"
|