Program of calculator which performs below operations Addition Subtract Division Multiplication
count=0 while [ $count -eq 0 ] do tput clear echo "1. Addition" echo "2. Subt" echo "3. Multi" echo "4. Divi" echo "5. Exit" echo -e "Enter Yr choice : \c" read choice if [ $choice -ne 5 ] then echo -e "Enter first number : \c" read a echo -e "Enter second number : \c" read b fi case $choice in 1) ans=`echo $a + $b | bc` echo "Addition is $ans" ;; 2) ans=`echo $a - $b | bc` echo "Sub is $ans" ;; 3) ans=`echo $a \* $b | bc` echo "Multi is $ans" ;; 4) echo scale=2 | bc ans=`echo $a / $b | bc` echo "Divi is $ans" ;; 5) exit 1 ;; *) echo "Invalid Choice !!!" ;; esac sleep 3 done