mirror of
https://github.com/autistic-symposium/shell-whiz-toolkit.git
synced 2025-08-13 08:35:46 -04:00
move shell scripts and zsh and add fav vscode themes
This commit is contained in:
parent
40077637ce
commit
e6794a8954
43 changed files with 55 additions and 34 deletions
18
shell/shell_scripts/lessons/factorial.sh
Executable file
18
shell/shell_scripts/lessons/factorial.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#! /bin/bash
|
||||
|
||||
n=0
|
||||
on=0
|
||||
fact=1
|
||||
|
||||
echo -n "Enter number to find factorial : "
|
||||
read n
|
||||
|
||||
on=$n
|
||||
|
||||
while [ $n -ge 1 ]
|
||||
do
|
||||
fact=`expr $fact \* $n`
|
||||
n=`expr $n - 1`
|
||||
done
|
||||
|
||||
echo "Factorial for $on is $fact"
|
Loading…
Add table
Add a link
Reference in a new issue