Guess the number: Difference between revisions

m
m (→‎version 2: added whitespace, expanded some comments.)
m (→‎{{header|Sidef}}: updated code)
Line 2,856:
 
=={{header|Sidef}}==
<lang ruby>var n = pickirand(1.., 10)
printvar msg = 'Guess the number: '
while (n != read(msg, Number).int) {
printmsg = 'Wrong! Guess again: '
}
say 'Well guessed!'</lang>
2,747

edits