#!/usr/bin/bash
clear
echo “Enter First Number”
read x
echo “Enter Second Number”
read y
#does not work for /bin/sh
(( z = $x + $y ))
(( a = $x – $y ))
(( b = $x * $y ))
(( c = $x / $y ))
#clear
echo “Addition of 2 numbers is =” $z
echo “Subtraction of 2 numbers is =” $a
echo “Multiplication of 2 numbers is =” $b
echo “Division of 2 numbers is =” $c
—————————–
Output – ?????
Enter First Number
20
Enter Second Number
5
Addition of 2 numbers is = 25
Subtraction of 2 numbers is = 15
Multiplication of 2 numbers is = 100
Division of 2 numbers is = 4 From: http://sitestree.com/?p=12181
Categories:Linux/Unix: Shell Programming – 001
Tags:
Post Data:2018-04-16 18:13:03
Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada