As I've stated in other posts, I'm working on a trig program bundle, with one of the functions being deg/rad and rad/deg conversion. However, I want to be able to view the coefficients of pi as fractions rather than decimals. For instance, if I type in the deg>rad section, "30", I get pi * .166666666... which, while correct, I want to have it displayed as "1/6." Not sure if it's possible, but I'm trying to make the program look nice. If it helps, I use a TI-84+CSE. and this is the code: (I'm aware the code doesn't work due to the "Goto Z" at the end, but that's because I'm planning to slot the code into the main program, so the error is intentional (for now at least.))
Code:
Thanks in advance!
Code:
Lbl CM
Menu("SELECT","DEG TO RAD",DA,"RAD TO DEG",DB,"BACK",DC)
Lbl DA
Degree
Input "ANGLE: ",θ
ClrHome
Output(1,1,"DEGREES: ")
Output(1,10,θ)
Output(2,1,"RADIANS: ")
Radian
θ°→N
N/π→N
Output(2,10,"π*")
Output(2,12,N)
Pause
Goto CM
Lbl DB
Radian
ClrHome
Input "RADIANS: ",R
ClrHome
Degree
R°→D
Output(1,1,"RADIANS: ")
Output(1,10,R)
Output(2,1,"DEGREES: ")
Output(2,10,D)
Pause
ClrHome
Goto CM
Lbl DC
Goto Z
Thanks in advance!