0 Members and 3 Guests are viewing this topic.
Everyone also forgot to mention that you need End at the end of an If/Then/Else statement. If you need anymore help just let us now
*Sigh*can we keep this on topic? The topic is about what the big thing might be, NOT SEX
My question is this: Is it possible to create a program to do the latter? The reason I ask this is because in my textbook it mentions that to convert decimals to degrees, you have to change the calculator's mode to get the correct answer.
-a program to convert decimals to degrees, minutes, seconds as well as convert degrees, minutes, seconds to decimals.My question is this: Is it possible to create a program to do the latter? The reason I ask this is because in my textbook it mentions that to convert decimals to degrees, you have to change the calculator's mode to get the correct answer.
Menu("","▶DMS",A,"▶Dec,BLbl AInput "Decimal? ",AClrHome60fPart(A→B60fPart(B→CDisp int(A),int(B),int(AnsPauseStopLbl BInput "D? ",AInput "M? ",BInput "S? ",C(C/60+B)/60+ADisp Ans
Input "D? ",AInput "M? ",BInput "S? ",C
Prompt D,M,S
Disp int(A),int(B),int(AnsPause
Disp int(A),int(BPause int(Ans
Not only is it possible, it's built into TIOS.
:Lbl A:Input "DMS=1, DEC=2", N:If N=1:Then:ClrHome:Prompt D,M,S:Disp DºM'S'':Pause:Goto B:End:If N=2:Then:ClrHome:Prompt N:Disp N▶DMS:Pause:Goto B:End:If N≠1:If N≠2:Then:ClrHome:Disp "TRY AGAIN!":Pause:Goto A:End:Lbl B:ClrHome:Input "PRESS 1 TO REPEAT", X:If X=1:Then:Goto A:End:If X≠1:Then:Stop
:Lbl A:Input "DMS=1, DEC=2", N:ClrHome:If N=1:Then:Prompt D,M,S:Disp DºM'S'':Goto B:End:If N=2:Then:Prompt N:Disp N▶DMS:Goto B:End:If N≠1 and N≠2:Then:ClrHome:Disp "Try again!":Pause:Goto A:End:Lbl B:Pause:ClrHome:Input "PRESS 1 TO REPEAT", X:If X=1:Goto A:If X≠1:Stop
If <condition>:Then<Code><Code>End
If <Condition><line of Code to be executed if the condition is true and skipped if false><line of code to be executed if the condition is false and skipped if true><rest of code>