8-Bit Software Online Conversion
Count Dutch Coins - Listing
10 REM COUNT WITH DUTCH COINS
20 REM By Ch.W.Brederode, Lisse
30 REM This is Public Domain
40 MODE1:HIMEM=&2CA0:*LOAD MUNTEN
50 CLS:PRINTTAB(0,8)"COUNT WITH DUTCH
MONEY"''
60 PRINT'"The computer puts down some
coins"
70 PRINT'"Behind each row you type th
e total"
80 PRINT'"amount in guilders"
90 PRINT'"After this you add up all"
100 PRINT'"When finished press RETURN
";
110 REPEATUNTILGET=13
120 DIM W%(5),T%(5)
130 P%=HIMEM:S%=&3000
140 VDU23,1,0;0;0;0;
150 CLS:SC=&3500
160 X=RND(-TIME)
170 :
180 FORN=0 TO 5:READ D:W%(N)=D:T%(N)=0
:NEXT
190 DATA 5,10,25,100,250,500
200 :
210 RIJ=6:MUNT=10: REM <<<<<<<< SET
RIJ (ROW) 1-6, MUNT (COIN) 3-10
220 TT=0:FOR Y%=0 TO RIJ-1
230 F%=1 +RND(MUNT-1):T%(Y%)=F%*W%(Y%)
:TT=TT+T%(Y%)
240 FOR G%=0 TO F%-1:PROCmunt(Y%,G%):N
EXT
250 NEXT
260 PRINTTAB(0,27)"HOW MUCH IS THIS?"
270 :
280 VDU23,1,1;0;0;0;
290 FOR Y%=0 TO RIJ-1
300 IP=0:F$="..,..":IF T%(Y%)<1000 THE
N F$=" .,.."
310 PRINTTAB(32,3+Y%*4)"F. "+F$
320 X=35:IF T%(Y%)<1000 THEN 340
330 PROCin
340 X=36:PROCin
350 X=38:PROCin
360 X=39:PROCin
370 IF IP<>T%(Y%) THEN300
380 NEXT
390 :
400 MOVE1000,232:DRAW1280,232
410 :
420 PRINTTAB(19,27)"TOTAL F. ";
430 F$="..,..":IF TT<1000 THEN F$=" .,
.."
440 PRINTF$;
450 IP=0:X=35:Y%=6:IF TT<1000 THEN470
460 PROCin
470 X=36:PROCin
480 X=38:PROCin
490 X=39:PROCin
500 IF IP<>TT THEN420
510 VDU23,1,0;0;0;0;
520 COLOUR1:PRINTTAB(0,30)"WELL DONE!"
:COLOUR3
530 PRINTTAB(19,30)"ONCE MORE?";
540 Q$=GET$:Q=INSTR("YyJjNn",Q$):IF Q=
0 THEN540
550 IF Q<5 THEN RESTORE:CLS:GOTO180
560 MODE7:END
570 :
580 DEFPROCmunt(Y%,G%)
590 S%=&3500+G%*48+Y%*&A00:P%=HIMEM+Y%
*144
600 FORN%=0 TO 2:FOR B%=0 TO 47
610 ?(S%+B%)=?(P%+B%):NEXT
620 P%=P%+48:S%=S%+&280:NEXT
630 ENDPROC
640 :
650 DEFPROCin
660 PRINTTAB(X,3+Y%*4);
670 Q$=GET$:IF Q$<"0" OR Q$>"9" THEN67
0
680 IP=10*IP+VAL(Q$):IF Q$="0"THEN Q$=
"O"
690 PRINT Q$;
700 ENDPROC