Menu("RADIAN CONVERSION","DEGREE TO RADIAN",1,"RADIAN TO DEGREE",2
Lbl 1
Input "DEGREE=",C
C/180⯈Frac→W
Goto 3
Lbl 3
Goto 4
Lbl 2
Input "RADIAN=","LEAVE OUT PIE",A
A(180)→D
Goto 5
Lbl 4
Disp "RADIAN",P
Lbl 5
Disp "DEGREE=",D
Stop
The error is in line 4. I know there are easier ways to do this but I just wanna learn.
Due to the language of TI-BASIC, variables aren't stored as fractions; they are floating point numbers. When you want to display a variable as a fraction, use the
⯈Fraccommand in theDispcommand itself. Note that this does not automatically display later values as fractions. Here is some code with//to mark a comment at the end of the line.