Shell Script for Addition, Subtraction, Multiplication, Division.

2nd Project in Shell Script for Addition, Subtraction, Multiplication, Division.

#!bin/bash
echo -n "Enter no 1:"
read n1
echo -n "Enter no 2:"
read n2
echo -n "Addition of Number1 and Number2 is: "
add=`expr $n1 + $n2`
echo $add
echo -n "Substraction of Number1 and Number2 is: "
sub=`expr $n1 - $n2`
echo $sub
echo -n "Multiplication of Number1 and Number2 is: "
mul=`expr $n1 \* $n2`
echo $mul
echo -n "Division of Number1 and Number2 is: "
div=`expr $n1 / $n2`
echo $div
You can fork this with the below Link:

Comments