A days between dates game. ----begin documentation---- This 82u-file was prepared by Mikael Bonnier, http://www.df.lth.se.orbin.se/~mikaelb/. ************************* * DBD.82P for the TI-82 * ************************* ACKNOWLEDGMENT DBD.82P was written by Ralph Payne of the TI Graphics Team and is released to the public domain. You may copy and change this program. INTRODUCTION This program calculates the days between dates. HOW TO PLAY DBD This program, DBD, calculates the days between dates. The program prompts you for two dates. After each date it displays the day of the week for that date. After the second date the number of days between the two dates is displayed. The number of days between dates is calculated such that there are 365 days between 1/1/93 and 1/1/94. The algorithm logic recognizes that the year 1900 was not a leap year and that the year 2000 is a leap year. This is because leap years are defined to be those years that are divisible by four unless they are divisible by one hundred unless they are also divisible by four hundred. ----begin ascii---- \START82\ \COMMENT=Program file dated 06/03/93, 10:41 \NAME=DBD \FILE=DBD.82P :1\->\F :For(I,1,2) :F\->\G :Input "ENTER MONTH ",M :Input "ENTER DAY ",D :Input "ENTER YEAR ",Y :If M<3 :Then:Y-1\->\Z :Else:Y\->\Z:End :365*Y+D+int (30.6*M-30.3)+int (Z/4)-int (Z/100)+int (Z/400)+int (3/(M+\#\ 1))*(M+1)+5\->\F : :7*fPart (F/7)\->\D :int (D+.5)\->\D :If D=0:7\->\D :If D=1:Disp "SUNDAY" :If D=2:Disp "MONDAY" :If D=3:Disp "TUESDAY" :If D=4:Disp "WEDNESDAY" :If D=5:Disp "THURSDAY" :If D=6:Disp "FRIDAY" :If D=7:Disp "SATURDAY" :End :F-G\->\D :Disp "DAYS BETWEEN",D \STOP82\ ----begin uue---- begin 644 DBD.82P M*BI423@R*BH:"@!0*E=% M1$Y%4T1!62H_SD1J-3[>*E1(55)31$%9*C_.1&HV/MXJ1E))1$%9*C_.1&HW I/MXJ4T%455)$05DJ/]0_1G%'!$0_WBI$05E3*4)%5%=%14XJ*T0_EF8` ` end ----end uue----