Friday, 12 December 2014

Shell Script to Display Table of any number

Write a Shell Script to Display Table of any number

Solution:
echo Enter any number
read a
n=1
echo The table for your entered number is:
while [ $n -lt 11 ]
do
b=`expr $a \* $n`
echo "$n * $a = $b"
n=`expr $n + 1`
done


Execution:


No comments:

Post a Comment