I want to make a simple calculator but this keeps bugging me up why is this happening anyone ??
# !/bin/bash
# Take user Input
echo "Enter Two numbers : "
read a
read b
# Input type of operation
echo "Enter Choice :"
echo "1. Addition"
echo "2. Subtraction"
echo "3. Multiplication"
echo "4. Division"
read ch
if (($ch==1))
then
res = $((a + b))
elif (($ch==2))
then
res = $((a - b))
elif (($ch==3))
then
res = $((a * b))
elif (($ch==4))
then
res = $((a / b))
else
echo ERROR
fi
echo Result is $res
i tried the case statement but same.