标签:ash let else break one The lse i++ 输入
#!/bin/bash
sui=$(expr $RANDOM % 100)
ci=0
echo "商品的价格"
while true
do
read -ep "请输入你猜测的价格" cai
let ci++
if [ $cai -eq $sui ]
then
echo "恭喜你猜对了实际价格$sui"
echo "你一共猜了$ci次"
break
elif [ $cai -gt $sui ]
then
echo "太高了"
else
echo "太低了"
fi
done
标签:ash let else break one The lse i++ 输入
原文地址:https://www.cnblogs.com/hyydeali/p/12838660.html