[upon request] Shell program to find factorial
echo "Enter the number "
read n
fact=1
for((i=1;i<=n;i++))
do
fact=`expr $fact \* $i`
done
echo factorial $fact
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment