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
16. Write a shell script to display multiplication table of given number gtu study material for engineering students

gtu os lab manual,

os GTU Practical,

operating system Programs,

Operating system shellscript programs,

Gtu study material 3140705,

OS 3140702,

os practical list,

shell script programming,

gtu os practical,

os lab solution gtu

Comments

YouTube

Popular posts from this blog

GTU OOP Program - 18

GTU OS Program - 7

GTU OS Program - 3