Pages

Generate a Multiplication table

Write a shell script to generate a multiplication table

echo Multiplication Table:
echo Which table do you want ? (Give Number):
read num
iter=1
while [ $num -le 5 ]
do
res=`expr $num \* $iter`
echo $num "*" $iter "=" $res
iter=`expr $iter + 1`
done

If you like this please Link Back to this article...



0 comments:

Post a Comment