Computer Science, asked by vidyavilasini8974, 1 year ago

Write a shell script to find the factorial of a given number using until loop.

Answers

Answered by Anonymous
0

echo factorial of a number

echo Enter the number

read n

i=1

fact=1

while test $i -le $n

do

fact=`expr $fact \* $i`

i=`expr $i + 1`

done

echo The factorial of a number is $fact

Similar questions