Sunday, January 15, 2012

Simple arithmetic program code in shell programming.


Here is a code in which simple arithmetic operation like-Addition , Subtraction, Multiplication, division and reminder are performed--


read  a
read  b
echo ******************************
echo Addition is= `expr $a + $b`
echo Substraction is= `expr $a - $b`
echo Modulas is= `expr $a % $b`
echo Multiplication is= `expr $a \* $b`
echo divide is= `expr $a / $b`
echo  ******************************


For Further Reading,
General, Linux

0 comments:

Post a Comment


 

Site Status

Man Behind Technical Today

Hello, I am Navin Bansal. I am a student of MCA in Rajsthan Institute of Engineering and Technology and owner of this blog. I share my view and ideas among people.