echo “Enter number”
read n
$i=1
$f=1
while [$i -lt $n]
do
expr ‘$f=$f\*$i’
expr ‘$i=$i +1’
done
echo “Factorial is...$f”
echo “Enter number”
read n
$i=1
$f=1
while [$i -lt $n]
do
expr ‘$f=$f\*$i’
expr ‘$i=$i +1’
done
echo “Factorial is...$f”
No comments:
Post a Comment