Number guess 1000 by nn

System.in.eachLine{n=it as int
int v
for(d=v=500;println(v+[' =\n',' >',' <'][v<=>n])||n-v;v+=0.5+(v<n?d:-d))d/=2}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page