GTU OS Program - 16 Multiplication Table Generator
16. Write a shell script to display multiplication table of given a number.
Start by creating a new file called multi_table.sh using vim
Complete code of the program
echo "Multiplication Table "
read -p "Enter the number : " n
i=0
for((i=1;i<11;i++))
do
echo "$n X $i = " "`expr $n \* $i`"
done
Interpreting the multi_table.sh file and executing it in terminal
tkanu025@hp:~/lab_solutions$ chmod +x multi_table.sh tkanu025@hp:~/lab_solutions$ ./multi_table.sh
Output

Comments