FIXED4 Maths Guessing Game 3IN1 by m.ukai

open Printf open String let p=print_endline
let rec(@)s?(r=read_line())i=r=""&s+1@i=p"";s=0&()=printf"value of %c is now%s
"r.[0](r$2);s=1&(printf"set rule of %c to %c=%s
"r.[5]r.[5](r$8);i=6&()=p"rule d not set");s=2&()=p[|"a = 3
you win!";"b = 13
you lose!
a wins!";"c = 1
tie!"|].(Char.code r.[1]-97);s@i+1and($)r i=sub r i(length r-i);;0@0

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


return to the top page