Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.

Accept numbers and perform addition subtraction division and multiplication


echo "Enter First Number := "
echo "Enter First Number := "
read a
echo "Enter Second Number := "
read b
ans=`expr $a + $b`
echo "Addition is :=" $ans

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

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

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


Output:


0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes