If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Fun C++ Problem

Originally Posted by VladimirF

If n is -20, i=0 will never be less than n.
Interestingly, since I didnít want to read past the first few posts, I did not realize that I played this game five years ago, and accidentally found (again) all three solutions. Again without timing; about 10 minutes, I guess.
Do I get a double bonus?

i is DEcremented, not INcremented. So i will= -1, -2, -3...etc until it passes -20.

Re: Fun C++ Problem

Neat question, not a very good introduction. Once someone finds three, they think they are a genius. Did someone find another?
By the way, the unary NOT is replacing a space (" ") just like the negative symbol