Magic 8-ball: Difference between revisions
→{{header|UNIX Shell}}: not using a hard-coded array length
(→{{header|UNIX Shell}}: style tweaks) |
(→{{header|UNIX Shell}}: not using a hard-coded array length) |
||
Line 2,784:
read -p 'Enter Question: '
[[ "$REPLY" == quit ]]
do printf "Response: %s\n\n" "${RESPONSES[RANDOM %
done
</syntaxhighlight>
|