Make a Code For Calculator in Linux Shell Scripts
echo "Enter the First Number:->";
read no1
echo "Enter The Second Number:->";
read no2
echo "1:Addition";
echo "2:Substraction";
echo "3:Multiplication";
echo "4:Division";
while ((1))
do
echo "Enter The Above Choice:->";
read c
case $c in
1) echo "Addition is:->" `expr $no1 + $no2`;
;;
2) echo "Substraction is:->" `expr $no1 - $no2`;
;;
3) echo "Multiplication is:->" `expr $no1 \* $no2`;
;;
4) echo "Division is:->" `expr $no1 / $no2`;
;;
0) exit
;;
*) echo "Please Enter Valid Choice:";
;;
esac
done
Make a Code For Calculator in Linux Shell Scripts
Reviewed by Unknown
on
23:17
Rating:
No comments: