10DEFFNS="Answer"
20MODE0
30PRINT"100 People. £100. Men get £10
. Women get .50p. Children get 12.5p."
40PRINT"How many men women and childr
en?"
50PRINT"Can Anyone find a better way
than this?"
60PRINT"Working"
70MenVal%=10
80WomenVal=.5
90ChildrenVal=.125
100Men%=9
110Women%=100
120Children%=100
130REPEAT
140Children%=Children%-1
150IF Children%=-1 Children%=100:Women
%=Women%-1
160IF Women%=-1 Women%=100:Men%=Men%-1
170People%=Men%+Women%+Children%
180Cash=(MenVal%*Men%)+(WomenVal*Women
%)+(ChildrenVal*Children%)
190UNTIL Cash=100 AND People%=100
200PRINT"Men ";STR$(Men%);" Women ";ST
R$(Women%);" Children ";STR$(Children%)
210END
220REM Answer is 7 49 44