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