echo "pleases input 2 numbers.\n" #请输入两个数
read -p "first numbers:" first #请输出第一个数
read -p "second numbers:" secon #请输入第二个数
total=$(($first*$secon)) #第一个数*第二个数赋值给total
echo -e "\n $first * $secon = $total" #输出echo -e $first*$secon=$total
使用shell脚本写出乘法
最新推荐文章于 2024-06-20 23:49:55 发布