Write a shell script to generate a multiplication table - Computer Programming

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

Thursday, October 6, 2011

Write a shell script to 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

No comments:

Post a Comment