Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count=10
- right=0
- while test $count -ne 1
- do
- ((a=$RANDOM%30))
- ((b=$RANDOM%30))
- ((c=a+b))
- read -p "$a+$b=" r
- test $c -eq $r && echo "Right";((right=right+1)) || echo "Wrong"
- ((count=count-1))
- done
- echo "Right: $right"
Advertisement
Add Comment
Please, Sign In to add comment