- #1
TTPW
- 4
- 0
TI-89 "PAY" program, infinite loop problem?
I have tried to write a program required for class (Math Analysis, junior in high school, everyone else has an 83 or 82 but my grandmother bought me this one...so nobody else has been able to help yet) but after solving one error message (I had to unlock a variable) another problem comes up. "Warning: overflow replaced by infinity or negative infinity." When I break the program's functioning by pressing ON it consistently takes me to the same place. Here's the entire program. I bolded the spot where Error: Break takes me to. I used lowercase letters, if there is an upper case letter that's because the lower case was easy to confuse with a number.
:pay()
:Prgm
:Input "loan", b
:Input "apr", r
:Input "payment", p
:b->L
:While p (less than or equal to sign goes here)btimesr/1200
:Disp "payment too small"
Input "payment=", p
EndWhile
0->n
1+r/1200->m
While b>p
btimesp-p->b
n+L->n
EndWhile
ptimesn+b->t
t-L->i
Disp "number payments", n
Disp "last payment", b
Disp "total paid", t
Disp "interest", i
EndPrgm
I have tried to write a program required for class (Math Analysis, junior in high school, everyone else has an 83 or 82 but my grandmother bought me this one...so nobody else has been able to help yet) but after solving one error message (I had to unlock a variable) another problem comes up. "Warning: overflow replaced by infinity or negative infinity." When I break the program's functioning by pressing ON it consistently takes me to the same place. Here's the entire program. I bolded the spot where Error: Break takes me to. I used lowercase letters, if there is an upper case letter that's because the lower case was easy to confuse with a number.
:pay()
:Prgm
:Input "loan", b
:Input "apr", r
:Input "payment", p
:b->L
:While p (less than or equal to sign goes here)btimesr/1200
:Disp "payment too small"
Input "payment=", p
EndWhile
0->n
1+r/1200->m
While b>p
btimesp-p->b
n+L->n
EndWhile
ptimesn+b->t
t-L->i
Disp "number payments", n
Disp "last payment", b
Disp "total paid", t
Disp "interest", i
EndPrgm