10 PRINT "DAYS BETWEEN TWO DATES"
20 PRINT
29 REM - STATEMENTS 30 TO 60 REQUEST USER INPUT
30 PRINT "FIRST DATE  MM,DD,YY";
40 INPUT M1,D1,Y1
50 PRINT "SECOND DATE  MM,DD,YY";
60 INPUT M2,D2,Y2
70 M=M1
80 D=D1
90 Y=Y1
100 GOSUB 230
109 REM - SAVE COMPUTED NUMBER OF DAYS IN N
110 N=A
120 M=M2
130 D=D2
140 Y=Y2
150 GOSUB 230
159 REM - CALCULATE DIFFERENCE AND PRINT
160 N=A-N
170 PRINT "DIFFERENCE =";N;" DAYS"
180 PRINT
190 PRINT "MORE DATA (1=YES 0=NO)"
200 INPUT X
210 IF X=1 THEN GOTO 20
219 REM - END OF PROGRAM
220 GOTO 460
227 REM - SUBROUTINE
228 REM - START WITH TEST FOR UNREAL DATE
229 REM - GOTO CORRECT TEST DEPENDING ON DAYS IN THE MONTH
230 ON M GOTO 260,280,260,340,260,340,260,260,340,260,340,260
239 REM - IF THIS MESSAGE IS PRINTED THE ANSWER IS PROB INCORRECT
240 PRINT "UNREAL DATE"
250 RETURN
260 IF D>31 THEN GOTO 240
270 GOTO 350
279 REM MONTH IS FEB A LEAP YEAR?
280 IF Y/4<>INT(Y/4) THEN GOTO 310
290 IF Y/400=INT(Y/400) THEN GOTO 320
300 IF Y/100<>INT(Y/100) THEN GOTO 320
310 IF D>28 THEN GOTO 240
320 IF D>29 THEN GOTO 240
330 GOTO 350 
339 REM MONTH HAS 30 DAYS
340 IF D>30 THEN GOTO 240
349 REM - TABLE OF NUMBER OF DAYS FROM 1ST OF YEAR TO 1ST OF EACH MONTH
350 DATA 0,31,59,90,120,151,181,212,243,273,304,334
360 RESTORE
365 FOR H=1 TO M
370 READ A
375 NEXT H
379 REM - COMPUTE NUMBER OF DAYS FROM 0,0,0 TO M,D,Y
380 A=A+Y*365+INT(Y/4)+D+1-INT(YEAR/100)+INT(Y/400)
390 IF INT(Y/4)<>Y/4 THEN GOTO 450
410 IF Y/400=INT(Y/400) THEN GOTO 430
420 IF Y/100=INT(Y/100) THEN GOTO 450
430 IF M>2 THEN GOTO 450
440 A=A-1
450 RETURN
460 END
400=INT(Y/400) THEN GOTO 430
420 IF Y/10