5 REM PROGRAM DATE
12000 CLS
12093 REM DELETE LINES 12000-12105 TO WRITE AS SUBROUTINE
12095 REM DELETE LINES 20000 -   TO WRITE AS SUBROUTINE
12100 GOTO 20000
12105 CLS
12110 FOR I= 1 TO 2
12115 REM REMOVE 12120 & 12130 TO WRITE AS SUBROUTINE
12120 PRINT "INPUT DATE ";I;" IN FORM MM,DD,YYYY";
12130 INPUT M(I),D(I),Y(I)
12140 IF M(I)=1 OR M(I)=2 GOTO 12180
12150 A1=365*Y(I) + D(I)+31*(M(I)-1) - INT(.4*M(I)+2.3)
12155 A2=INT(Y(I)/4)-INT(.75*(INT(Y(I)/100)+1))
12160 GOTO 12190
12180 A1=365*Y(I)+D(I)+31*(M(I)-1)+INT((Y(I)-1)/4)
12185 A2=-INT(.75*INT(((Y(I)-1)/100)+1))
12190 F(I)=A1+A2
12195 NEXT I
12197 F(3)=F(2)-F(1)
12198 REM RETURN HERE IF WRITTEN AS SUBROUTINE. F(3) IS CALCULATED NUMBER OF DAYS
12199  PRINT @ 320," "
12200 PRINT"THE NUMBER OF DAYS BETWEEN ";M(1);"/";D(1);"/";Y(1);"AND"
12210 PRINT M(2);"/";D(2);"/";Y(2) ;"EQUALS "; F(2)-F(1)
12300 PRINT
12310 PRINT "PRESS 1 FOR MORE FOR TRIALS, 0 TO END.";:INPUT Z8
12320 IF Z8=1 GOTO  12105
12330 IF Z8=0 THEN END
12340 PRINT "INPUT ERROR.TRY AGAIN"
12350 FOR I=1 TO 300:NEXT I
12360 GOTO 12300
20000 PRINT"       NUMBER OF DAYS BETWEEN DATES"
20010 PRINT
20020 PRINT"THIS PROGRAM WILL DETERMINE THE NUMBER OF DAYS BETWEEN ANY
20030 PRINT"TWO CALENDAR DATES AFTER 1582. tHE PROGRAM IS SET UP SO
20040 PRINT"THAT THERE IS ONE DAY'S DIFFERENCE BETWEEN 2 CONSECUTIVE
20050 PRINT"DAYS. 
20060 PRINT"INPUT IS JUST THE 2 GIVEN DATES. OUTPUT GIVES THE NUMBER 
20070 PRINT"OF DAYS BETWEEN THE DATES.
20080 PRINT
20090 INPUT"PRESS ENTER TO BEGIN";Z9
20100 GOTO 12105
