This week's book giveaway is in the Servlets forum. We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line! See this thread for details.

well this is a little bit difficult to guess but I think this is the best way to do this
we are given 4 compound operators and we have to use them exactly once
now given that we want output as 33 and x =7 and y = 2
we have to give just trial and error to this
33 is big as compared to 2 and 7 and hence we will use *= operator first
and also we have to use only 2 x we will use them all in this line only

this gives x = 49
now we have to reduce the answer by 16 to get 33
what do we have now?
4 y's , 2 *= and one -=
we can achieve 16 by

now y is 4

now it is 16
as we have x = 49 and y = 16
we can write

this gives 49-16 = 33

SCJP 6 [86%] June 30th, 2010
OCPWCD [84%] March 26th, 2013
If you find any post useful, click the "plus one" sign on the right

There is no straight forward technique for solving this kind of problem. I consider
myself lucky to have spotted how the elements might fit together in a reasonable
amount of time. But it could have taken for ever. What helped was to "fiddle" with
the given information on paper, play what-if mind games and draw pictures. There
were constraints in both the fill-in template and the cut-and-paste elements. I know
that this may not be very helpful, but it's all I have to offer.

That one was a little TOO puzzle-y. We were trying to sort of emulate a drag and drop question, but none of the real D&D questions are that puzzle-y. So I'd say don't spend too much time on that particular question.

hth,

Bert

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)