-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAge Displayer.txt
148 lines (125 loc) · 1.21 KB
/
Age Displayer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
lBL 0
ClrHome
Disp "Year?"
Prompt A
Disp "Month?"
Prompt B
If B<1 or B>12
Goto B
Disp "Day?"
Prompt C
Goto 1
Lbl B
ClrHome
Disp :"Enter a valid","month"
Pause
Goto 0
Lbl 1
If B=1
31->G
If B=2
Goto G
Lbl 2
If B=3
31->G
If B=4
30->G
If B=5
31->G
If B=6
30->G
If B=7
31->G
If B=8
31->G
If B=9
30->G
If B=10
31->G
If B=11
30->G
If B=12
31->G
Goto 3
Lbl G
If A=2008 or 2012 or 2016 or 2020
1->H
If H=1
29->G
If H≠1
28->G
Goto 2
Lbl 3
If C<1 or C>G
Goto C
Goto 4
Lbl C
ClrHome
Disp "Enter a valid","day"
Pause
Goto 0
Lbl 4
ClrHome
Disp "Loading...."
getDate->L1
If A>L1(2)
Goto D
If A=>L1(1) and B>L1(2)
Goto D
If A=L1(1) and B=L1(2) and C>L1(30
Goto D
Goto 5
Lbl D
ClrHome
Disp "Enter a date in","the past"
Pause
Goto 0
Lbl 5
getDate->L1
L1(1)-A ->D
L1(2)-B ->E
L1(3)-C ->F
If E<0
D-1 ->D
If E<0
12+E ->E
If F<0
E-1 ->E
If F<0
G=F ->F
If L1(2)=B and C>L1(3)
D-1 ->D
If L1(2)=B and C>L1(3)
12+E ->E
Lbl 6
ClrHome
Menu("Output?","Year+Month+Day",N,"In days",Z
Lbl N
ClrHome
Disp "Years:"
Disp D
Disp "Months:"
Disp E
Disp "Days:"
Disp F
Goto 7
Lbl Z
E*365 ->I
E*30 ->J
I+J+D ->K
ClrHome
Disp "Days:"
Disp K
Lb 7
DelVar A
DelVar B
DelVar C
DelVar D
DelVar E
DelVar F
DelVar G
DelVar H
DelVar I
DelVar J
DelVar K
ClrList L1