8-Bit Software Online Conversion

Back to The Puzzle - Listing

10REM" 'PuzQuik' J.Davis - '96. 20MODE7 30PRINT" * P U Z Q U I K * " 40PRINT 50PRINT" Back at the £100/100 peopl e puzzle of 8BS-45, it can be speeded up to take 7/100ths of a second to run (including the 2/100ths of a second it takes to print the answer...)." 60PRINT" First, if the upper limit for men is usually set at 9 (or 8), bec ause at more than that there wouldn' t be enough money left, why not set the lower limit as well. This is 6, because at less" 70PRINT" than that there is too much money left- £50 or more - for the others to use up."; 80PRINT" Then, in a 4-iteration loo p, there is one calculation linking men and women (pardon?), and one test to e liminate fractional and negative wome n..." 90PRINT'" PRESS SPACE TO RUN PROGRAM: " 100PRINT'" MEN: WOMEN: CHILDREN :" 110PRINT" "; 120G=GET:PRINT:VDU11 130TIME=0 140 FORM%=6TO9 150 W=(700-79*M%)/3 160 IF ABS(INT(W))=W AND (100-M%-W)>0 THEN PRINT" ";M%;TAB(10);W;TAB(20);100-M %-W 170 NEXT 180PRINT'" TIME= ";TIME;"/100ths sec." ;TAB(27)" Again(Y/N)?"; 190G$=GET$:PRINT'CHR$(148);STRING$(39, "p"):IFG$="Y" THEN 130 200PRINT'" P.S. The program runs pr operly for any values for men (M%), su ch as 1 TO 98 (.86sec), or even, say,- 500 TO 500." 210PRINT'" Watch this space for a pr ogram to set this sort of puzzle." 220PRINT'CHR$(148);STRING$(39,"p")