athematic operations

 
=======================================================
#numbers and athematic
=======================================================
#! bin/bash
#arthemetic operations

n1=10
n2=40

echo $(( n1 + n2 ))
echo $(( n1 - n2 ))
echo $(( n1 * n2 ))
echo $(( n1 / n2 ))
echo $(( n1 % n2 ))
echo "================================"
echo $( expr $n1 + $n2 )
echo $( expr $n1 - $n2 )
echo $( expr $n1 \* $n2 ) #note: expr will recognize the (*) symbol, it will give syntax error
echo $( expr $n1 / $n2 )
echo $( expr $n1 % $n2 )


[prabhucloudxlab@cxln4 ~]$ sh hello.sh
50
-30
400
0
10
================================
50
-30
400
0
10