a guest Apr 6th, 2020 178 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- echo "Welcome to Guess the Age!"
- randomage=$(shuf -i 20-70 -n 1)
- echo $age
- read -p "Please input an age between 20 and 70: " guess
- while read $guess;
- if [ $guess -eq $randomage ];
- if [ $guess -gt $randomeage ];
- echo -n "Too high"
- elif [ $guess -lt $randomage ];
- echo -n "Too low"
RAW Paste Data