So I'm writing a TI-BASIC algorithm for my calculator that does ratios. Here is the code:
Disp "GIVE ONE NUMBER"
Prompt A
Disp "GIVE A SECOND NUMBER"
Prompt B
While fPart(A)≠0 or fPart(B)≠0
A*10->A
B*10->B
End
gcd(A,B)->C
Disp A/C
Disp B/C
It seems to work in most cases. Are there any flaws/corner cases of this code that I have not noticed? Thanks.