Guess the number/With feedback (player): Difference between revisions

Added Easylang
(Added Easylang)
 
(One intermediate revision by one other user not shown)
Line 1,132:
readln;
end.</syntaxhighlight>
=={{header|EasyLang}}==
{{trans|Ring}}
<syntaxhighlight>
min = 1
max = 100
print "Think of a number between " & min & " and " & max
print "I will try to guess your number."
repeat
guess = (min + max) div 2
print "My guess is " & guess
write "Is it higher than, lower than or equal to your number? "
answer$ = input
print answer$
ans$ = substr answer$ 1 1
until ans$ = "e"
if ans$ = "l"
min = guess + 1
elif ans$ = "h"
max = guess - 1
else
print "Sorry, i didn't understand your answer."
.
.
print "Goodbye."
</syntaxhighlight>
 
=={{header|Elixir}}==
{{works with|Elixir|1.2}}
Line 3,945 ⟶ 3,971:
{{trans|Kotlin}}
{{libheader|Wren-str}}
<syntaxhighlight lang="ecmascriptwren">import "io" for Stdin, Stdout
import "./str" for Char
 
var hle
1,969

edits