postheadericon Write a shell script to accept numbers and perform addition, subtraction, division and multiplication.


echo "Enter Number 1 : "
read a
echo "Enter Number 2 : "
read b

ans=`expr $a + $b`
echo "Addition : " $ans

ans=`expr $a - $b`
echo "Subtraction : " $ans

ans=`expr $a / $b`
echo "Division : " $ans

ans=`expr $a \* $b`
echo "Multiplication : " $ans

0 comments:

Follow by Email

Total Pageviews

© BipinRupadiya.com. Powered by Blogger.