下面执行这个脚本,做两个数字的加法。
sh calculator.sh
Calculator
1.+
2.-
3.*
4./
Enter your choice :1
Enter the first number:
10
Enter the second number:
20.3
the result is:
30.3
若输入除了1-4之外的数据:
sh calculator.sh
Calculator
1.+
2.-
3.*
4./
Enter your choice :6
calculator.sh: a simple calculator
