CODE
echo "Enter Two Integer Numbers ::"
read n1 n2
sum=`expr $n1 + $n2`
sub=`expr $n1 - $n2`
mul=`expr $n1 \* $n2`
div=`expr $n1 / $n2`
echo "Addition :" $sum
echo "Subtraction :" $sub
echo "Multiplication :" $mul
echo "Division ::" $div
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
CODE
echo "Enter Two Integer Numbers ::"
read n1 n2
sum=`expr $n1 + $n2`
sub=`expr $n1 - $n2`
mul=`expr $n1 \* $n2`
div=`expr $n1 / $n2`
echo "Addition :" $sum
echo "Subtraction :" $sub
echo "Multiplication :" $mul
echo "Division ::" $div
CODE
n1=10
n2=20
n3=15
sum=`expr $n1 + $n2 + $n3`
echo " SUM = " $sum
CODE
n1=10
n2=20
sum=`expr $n1 + $n2`
echo " SUM = " $sum
Output :
Today is September 24 2009
Today is Thursday
Time is in hh: mm: ss AM/PM
Code :
NOW=$(date +"%B %C %Y")
echo "Today is" $NOW
NNOW=$(date +"%A")
echo "Today is" $NNOW
TTIME=$(date +"%r")
echo "Time is " $TTIME
Output :
$ sy1.sh
Today is March 01 2021
Today is Monday
Time is 10:44:12 AM