Home / Expert Answers / Computer Science / linux-calculator-make-bourne-shell-program-that-calculates-given-arguments-operand-operator-and-pa756

(Solved): LINUX Calculator Make Bourne Shell program that calculates given arguments (operand, operator and ...



LINUX

Calculator
Make Bourne Shell program that calculates given arguments (operand, operator and operand) like (3+4) and echos cal

Calculator Make Bourne Shell program that calculates given arguments (operand, operator and operand) like (3+4) and echos calculation with words like "3 multiplied by 4 equals 12". Operators to handle must be + (plus) - (minus) * (multiply) and / (divide). Remember shell globbing when testing multiply. You must use case structure and may use arithmetic extension $((EXPR)) to calculate numbers.


We have an Answer from Expert

View Expert Answer

Expert Answer


Solution :- #!/bin/sh calculate() { case $2 in "+") echo "$1 plus $3 equals $(($1 + $3))";; "-") echo "$1 minus $3 equals $(($1
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe