You can
put this solution on YOUR website!Generating 20:
(5+2)*4-8 = 7*4-8 = 28-8 = 20
or
(5-2)*4+8 = 3*4+8 = 12+8 = 20
or
(8-5+2)*4 = 5*4 = 20
Generating 17:
5+2*8-4 = 5+16-4 = 21-4 = 17
Generating 39:
It is NOT possible to generate 39 using the given numbers and rules above. I've tried all possible combinations and cannot get 39 (you could get 39 if you allowed two + symbols since 8*4+5+2 = 39)
Generating 13
(8-4)*2+5 = 4*2+5 = 8+5 = 13