#!/bin/sh
echo Enter the multiplication number required:
read number
for i in 1 2 3 4 5 6 7 8 9 10
do
echo "$number * $i = expr $number \* $i"
done
I am not getting the output for this multiplication table.
#!/bin/sh
echo Enter the multiplication number required:
read number
for i in 1 2 3 4 5 6 7 8 9 10
do
echo "$number * $i = expr $number \* $i"
done
I am not getting the output for this multiplication table.
Try this code : -
$ cat mul.sh
#!/bin/sh
echo Enter the multiplication number required:
read number
for i in 1 2 3 4 5 6 7 8 9 10
do
echo "$number * $i = `expr $number \* $i`"
done
$
Hi, Thanks a lot ,
actually i forgot to put `.
You are welcome...
No Issues
There's no need for the external command, expr:
$
echo Enter the multiplication number required:
read number
for i in 1 2 3 4 5 6 7 8 9 10
do
echo "$number * $i = $(( $number * $i ))"
done
$