Game24 KiXtart Golf running under KiXtart v4.11

Numbers = 1, 2, 3, 4
Please doublecheck your solution to guarantee a correct result
(1.0+2.0+3.0)*4.0 = 24

Numbers = 2, 2, 6, 8
Please doublecheck your solution to guarantee a correct result
(2.0+6.0)+(8.0*2.0) = 24

Numbers = 4, 4, 6, 6
Correct answer answer, there is no solution to this combination

Numbers = 3, 3, 8, 8
Please doublecheck your solution to guarantee a correct result
8.0/(3.0-8.0/3.0) = 24

Numbers = 0, 0, 8, 4
No solution found
<> 24

Numbers = 3, 4, 7, 7
Please doublecheck your solution to guarantee a correct result
(3.0+4.0*7.0)-7.0 = 24

Numbers = 1, 2, 8, 9
Please doublecheck your solution to guarantee a correct result
(8.0*9.0)/(2.0+1.0) = 24

Time: 4546 ticks

KixGolf v3.0.3 score = 434, running under KiXtart v4.10
code:
function game24($a,$b,$c,$d)

Dim $h, $j, $l, $p, $q, $r, $s, $t, $v, $, $x, $y

$h = "+","-","/","*"
for $y=1 to 4
for $x=1 to 4
for each $p in $h
for each $q in $h
for each $r in $h
for each $j in split("0,8,10,18~0,12~4,16","~")
$ = ".0"
$s = ""+$a+$+$p+$b+$+$q+$c+$+$r+$d+$
for each $ in split($j,",")
$l = chr(40 + ($l="("))
$s = "" + left($s,$) + $l + substr($s,1+$)
next
$t = execute("$$v=$s")
if abs($v-24)< 1E-9
goto E
endif
next
next
next
next
$ = $b
$b = $c
$c = $d
$d = $
next
$ = $a
$a = $b
$b = $
next
$s = ""

:E
$game24 = $s
endfunction



[ 22. September 2002, 01:06: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/