1 REM  *  CHECK WRITER  *
2 REM  *  THANKS TO JOHN W. MELTON, III   *
3 REM  *  910 SADDLEBACK COURT, MCLEAN, VA. 22102   *
4 REM  *  FOR DEBUGGING CHECK WRITER, 5/31/79   *
5 CLEAR 100
6 DEFDBL A
7 CLS
10 PRINT @ 404, "CHECK WRITER"
20 PRINT
30 DATA "JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY"
40 DATA "AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"
50 DATA "ONE","TWO","THREE","FOUR","FIVE","SIX","SEVEN","EIGHT","NINE"
60 DATA "TEN","ELEVEN","TWELVE","THIRTEEN","FOURTEEN","FIFTEEN","SIXTEEN"
70 DATA "SEVENTEEN","EIGHTEEN","NINETEEN","TWENTY","THIRTY","FORTY"
80 DATA "FIFTY","SIXTY","SEVENTY","EIGHTY","NINETY"
89 REM - ENTER DATE WITH COMMAS; DAY AND YEAR MUST CONTAIN TWO DIGITS
90 PRINT "DATE (MM,DD,YY)";
100 INPUT D,D2,D3
110 PRINT "--(TO END PROGRAM ENTER 'END')--"
120 PRINT "FIRST NAME OF PAYEE";
130 INPUT F$
139 REM - END PROGRAM?
140 IF F$="END" THEN 790
150 PRINT "LAST NAME OF PAYEE";
160 INPUT L$
170 PRINT "AMOUNT OF CHECK";
180 INPUT A
189 REM - INSERT BLANK CHECK IN PRINTING DEVICE, HIT ENTER WHEN READY
190 PRINT "HIT ENTER TO PRINT CHECK";
200 INPUT X
230 REM - GO TO CORRECT MONTH IN DATA TABLE
235 RESTORE
240 FOR X=1 TO D
250 READ X0$
255 NEXT X
259 REM - PRINT DATE
260 PRINT ,,,X0$;D2;D3
265 A$="**$##,#.##"
267 B$="**##,##.##"
269 REM - PRINT AMOUNT TWICE; FIRST TIME FOR SHADED BOX
270 PRINT ,,,:PRINT USING A$;A
280 PRINT ,,,:PRINT USING B$;A
290 PRINT
300 PRINT ,F$;" ";L$
310 PRINT
319 REM - AMOUNT OF CHECK LEGITIMATE?
320 IF A<=0 THEN 770
330 A1=A:N1=0:A3=0
339 REM - AMOUNT IN THE THOUSANDS?
340 N1=INT(A1/1E3)
349 REM - CAN'T PRINT FOR AMOUNT OVER $99999.99
350 IF N1>99 THEN 770
360 IF N1=0 THEN 390
370 GOSUB 640
380 PRINT "THOUSAND ";
390 A1=A1-N1*1E3
399 REM - AMOUNT IN THE HUNDREDS?
400 N1=INT(A1/100)
410 IF N1=0 THEN 440
420 GOSUB 640
430 PRINT "HUNDRED ";
440 A1=A1-N1*100
449 REM - AMOUNT IN THE ONES OR TENS?
450 N1=INT(A1)
460 IF N1>0 THEN 490
470 IF A >=1 THEN 492
480 GOTO 510
490 GOSUB 640
492 IF A<=1.99 THEN PRINT "DOLLAR ";
494 IF A>1.99 THEN PRINT "DOLLARS ";
501 GOTO 510
510 A1=A1-N1
519 REM - ANY CENTS?
529 REM - IF AMOUNT IS CENTS ONLY DON'T PRINT 'AND'
530 IF A<1 THEN 550
540 PRINT "AND";
550 A1=INT(A1*100)
555 IF A1>1 THEN 560
556 IF A1=0 THEN PRINT " NO CENTS"
557 IF A1=1 THEN PRINT " 0";A1;"CENT"
558 GOTO 570
559 REM - CENTS ARE PRINTED IN NUMERIC FORM
560 IF A1<10 THEN PRINT " 0";A1;"CENTS" :ELSE PRINT A1;"CENTS"
569 REM - SPACE OFF OF CHECK
570 PRINT
580 PRINT
590 PRINT
600 PRINT
610 PRINT
620 PRINT
629 REM - RESTART PROGRAM
630 GOTO 120
639 REM - SUBROUTINE TO GET WORDS FOR NUMBERS
640 IF N1<21 THEN 752
645 RESTORE
650 FOR X=1 TO 12+(N1-20)/10+20
660 READ X0$
665 NEXT X
670 PRINT X0$;
680 A3=N1-INT(N1/10)*10
690 IF A3=0 THEN 760
700 PRINT "-";
730 RESTORE
735 FOR X=1 TO 12+A3
740 READ X0$
745 NEXT X
750 PRINT X0$;" ";
751 GOTO 760
752 RESTORE
753 FOR X=1 TO 12+N1
754 READ X0$
755 NEXT X
756 PRINT X0$;" ";
759 REM - END OF SUBROUTINE
760 RETURN
770 PRINT ,"*****VOID*****"
780 GOTO 570
790 END
