TI-83 Clock

CalcNerd 24 Jun 2020 14:13

I am working on a clock program (Ti-83+) and can't get it to match an actual clock very well. I am using iPart( which could be the problem? This version of the code is roughly 12 seconds behind at 30 minutes and at an hour it is 8 seconds ahead. It does this consistently with the number that I am using right now. I am very open to anything that anyone might have!

Code:

```
:ClrHome
:0→X
:Prompt H,M // Hours and Minutes
:ClrHome
:Lbl 1 // I checked it for a memory leak and I think that it is ok
:iPart(X/5.445809055→S // Number that I have come up with lots of testing
:Output(4,7,":
:Output(4,10,":
:If H>12
:Output(4,5,H
:If H<=12
:Then
:Output(4,5,"0
:Output(4,6,H
:End
:If M>=10
:Output(4,8,M
:If M<10
:Then
:Output(4,8,"0
:Output(4,9,M
:End
:If S>=10
:Output(4,11,S
:If S<10
:Then
:Output(4,11,"0
:Output(4,12,S
:End
:If S=60
:Then
:0→S
:ClrHome
:0→X
:M+1→M
:End
:If M=60
:Then
:0→X
:0→M
:0→S
:H+1→H
:End
:If H>=24
:Then
:1→H
:0→M
:0→S
:ClrHome
:End
:X+1→X
:Goto 1
```