Posted By
SVS on 2006-06-28 02:46:15
| Re: The Plus4 programmer Summer quiz!
The "nice" solution is:
10 Q=(255-6)/7 20 PRINT "FORMULA RESULT=";6+Q*7 30 IF 6+Q*7<>255 THEN PRINT "IS NOT";: ELSE PRINT "IS"; 40 PRINT " EQUAL TO 255"
I've only inverted the arguments of equation in line 30. Even if it seems incredible, in this way the result is correct. Any idea about the reason?
|