Monday 9 July 2012

Table

i=0
sum=0
echo -e "Please enter the number that you want Table:\c"
read a


for i in 1 2 3 4 5 6 7 8 9 10
        do
                echo -e "$a * $i =`expr $a \* $i`"
        done

--------------------------------------------------------------------------------------------------------------
                OUTPUT
Please enter the number that you want Table:10
10 * 1 =10
10 * 2 =20
10 * 3 =30
10 * 4 =40
10 * 5 =50
10 * 6 =60
10 * 7 =70
10 * 8 =80
10 * 9 =90
10 * 10 =100

0 comments:

Post a Comment