Guess game done

This commit is contained in:
Arkadiusz Hypki 2023-05-29 17:49:04 +02:00
parent 924196de1f
commit c477b99571

View File

@ -0,0 +1,18 @@
echo "Guess game. What is the number I'm thinking about?"
num=$(($(($RANDOM % 20))+1))
ex=1
while [ 1 -eq $ex ]
do
read usr
if [ $num == $usr ]
then
echo "Great it is $num"
ex=0
else
echo "No, it is not that number"
fi
done