For the past few months, I have been learning TI-BASIC programming and have become very proficient in that "language". I have recently been trying to convert the BASIC math programs on my TI-84+ calculator to one flash ROM application. My original plan was to use BasicBuilder 3.0 to compile and compress my programs into a single-page flash app. This has not worked because I receive an error message (Error: [File] has an invalid header) for most of my programs when I try to upload them, especially the larger ones around 6 KB. Apparently, BasicBuilder will compress my programs into a single-page app whereas my programs use 30,179 bytes of RAM memory when on the calculator's RAM (so I would need to make a two-page app). I have all of the algorithms for my math programs written in BASIC but I could not find how to write those same algorithms in Z80. Also, I do have all kinds of utilities downloaded like the whole TI SDK, Rabbitsign/Wappsign, and ZiLOG Developer Studio (ZDS).
Can anyone assist me with the BasicBuilder error or with the development of an app traditionally or with another utility? Any help would be greatly appreciated.
Graphing Calculator
There are a few issues here...
1) To develop an app traditionally, you would need to learn Z80 which is a completely different language, so that's pretty much out of the picture.
2) There isn't 30kb of user accessible RAM on a ti-84 + so I don't know how you are putting them all in your RAM, are you on a ti-84 + CE, in which case BB will not work given the lack of signing key.
3) As you mentioned, BB will only make single page apps and not a 2 page app, so you won't be able to make it work.
3) Why on earth are you making something 30kb, this calls for an optimization job!
If you post your code, I think it might be possible to optimize it down to the size of a single page app (depending on how efficient your coding habits are), and then you will be able to use BB to make it into an app.
I concur with the third point. While I don't know about your specific case, BASIC code can very often be optimized for size—at the minimum, through small tricks (assuming you haven't applied them already), by 10% or so, and often much more. For example, if you have 20 KB of lowercase letters, that can be cut in half by making them uppercase, and maybe translating them to lowercase.

z80 assembly isn't inherently better than BASIC. True, it's several times faster, but math formulas are several times smaller, easier to write, and easier to understand in BASIC.
*Accidental Submission:Please view post below.*
To clarify, I have a TI-84+ but am not able to put 30 KB of programs onto a calculator that only has 24 KB of accessible RAM. Of my total of 17 programs, 4 of them take up just under 24 KB. If someone could help me with the optimization that would be great. The one skill that I'm not very good at is using loops like "For(" and "While". If someone could help me with the Optimization, that would be great. I apologize if my code is messy, I'm a beginner and the TI Connect CE studio does not allow tabs for indentation. I could take some components out if I need to, I would just like to have it all. I know this is a lot but thank you in advance if anyone is able to help.

1. 5985 KB

Code:

Degree
Lbl 0
ClrHome
Menu("CALCULATE:","INTERIOR ANGLE",11,"AREA",12,"VOLUME",13,"SURFACE AREA",14,"EXIT",99)

Lbl 99
Stop

Lbl 11
ClrHome
Disp "REGULAR POLYGON:"
Disp ""
Disp "HOW MANY"
Input "SIDES? ",N
If fPart(N)≠0 or N≤2
Then
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
Else
(180(N-2))/N→X
ClrHome
Disp "SIDES="
Output(1,7,N)
Disp ""
Disp "EACH INTERIOR"
Disp "ANGLE="
Disp ""
Output(4,7,X)
Output(5,7,"DEGREES")
Stop
End

Lbl 12
ClrHome
Disp "HOW MANY"
Input "SIDES? ",N

If fPart(N)≠0 or (N≤2 and N≠1)
Then
ClrHome
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
Else

If N=1
Then
Menu("SHAPE:","CIRCLE",18,"ELLIPSE",19,"EXIT",99
Lbl 18
ClrHome
Input "RADIUS=",R
R*R→R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"AREA=")
Output(3,2,"π*")
Output(3,4,round(R,4))
Output(4,3,"OR")
Output(5,2,round(πR,4))
Output(3,10,"SQUARED")
Output(4,11,"UNITS")
Stop
Lbl 19
ClrHome
Disp "LENGTH OF"
Input "MAJOR AXIS=",A
A/2→A
Disp ""
Disp "LENGTH OF"
Input "MINOR AXIS=",B
B/2→B
AB→R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"AREA=")
Output(3,2,"π*")
Output(3,4,round(R,4))
Output(4,3,"OR")
Output(5,2,round(πR,4))
Output(3,10,"SQUARED")
Output(4,11,"UNITS")
Stop
Else

If N=3
Then
ClrHome
Menu("TRIANGLE NATURE:","RIGHT",21,"OBLIQUE",22,"EXIT",99)
Lbl 21
ClrHome
Input "BASE=",B
Disp ""
Input "HEIGHT=",H
ClrHome
Disp "AREA="
Output(1,6,round((BH)/2,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 22
ClrHome
Input "SIDE a=",A
Disp ""
Input "SIDE b=",B
Disp ""
Input "SIDE c=",C
ClrHome
(A+B+C)/2→S
√(S(S-A)(S-B)(S-C))→A
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Else

If N=4
Then
Lbl 98
ClrHome
Menu("QUADRILATERAL:","SQUARE",31,"RECTANGLE",32,"RHOMBUS",33,"TRAPEZOID",34,"KITE",35,"EXIT",99)

Lbl 31
ClrHome
Menu("GIVEN:","SIDE LENGTH",40,"DIAGONAL",41,"RETURN",98,"EXIT",99)
Lbl 40
ClrHome
Input "SIDE LENGTH=",A
ClrHome
Disp "AREA="
Output(1,6,round(A²,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 41
Input "DIAGONAL=",A
ClrHome
Disp "AREA="
Output(1,6,round(A²/2,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 32
ClrHome
Input "BASE=",B
Disp ""
Input "HEIGHT=",H
ClrHome
Disp "AREA="
Output(1,6,round(BH,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 33
ClrHome
Menu("GIVEN:","BASE-HEIGHT",42,"DIAGONALS",43,"RETURN",98,"EXIT",99)
Lbl 42
Goto 32
Lbl 43
ClrHome
Input "DIAGONAL #1=",A
Disp ""
Input "DIAGONAL #2=",B
ClrHome
Disp "AREA="
Output(1,6,round((AB)/2,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 34
ClrHome
Menu("GIVEN:","BASES",44,"MIDSEGMENT",45,"RETURN",98,"EXIT",99)
Lbl 44
ClrHome
Input "BASE #1=",A
Disp ""
Input "BASE #2=",B
Disp ""
Input "HEIGHT=",H
(A+B)/2→M
MH→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 45
ClrHome
Input "MIDSEGMENT=",M
Disp ""
Input "HEIGHT=",H
(A+B)/2→M
MH→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 35
Input "SIDE LENGTH=",A
Disp "
Disp "SIDE WITH OTHER"
Input "LENGTH=",B
(AB)/2→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Else
ClrHome
Menu("GIVEN:","SIDE LENGTH",50,"RADIUS",51,"APOTHEM",52,"EXIT",99)
Lbl 50
ClrHome
Input "SIDE LENGTH=",S
(S²N)/(4*tan(180/N))→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 51
ClrHome
Input "RADIUS=",R
(R*R*N*sin(360/N))/2→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 52
ClrHome
Disp "APOTHEM"
Input "LENGTH=",A
A²*N*tan(180/N)→A
ClrHome
Disp "AREA="
Output(1,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
End


Lbl 13
ClrHome
Menu("VOLUME:","CUBE",101,"REGULAR PRISM",102,"CYLINDER",103,"CONE",104,"SQUARE PYRAMID",105,"SPHERE",106,"RETURN",107)

Lbl 101
ClrHome
Input "SIDE LENGTH=",S
S^3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop

Lbl 102
ClrHome
Menu("PRISM TYPE:","RECTANGULAR",111,"TRIANGULAR",112,"OTHER",113,"RETURN",114,"EXIT",99)
Lbl 111
ClrHome
Input "LENGTH=",L
Disp ""
Input "WIDTH=",W
Disp ""
Input "HEIGHT=",H
LWH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Lbl 112
ClrHome
Disp "REGULAR TRIANGLE"
Disp ""
Disp "SIDE LENGTH OF"
Input "TRIANGLE=",S
Disp ""
Disp "HEIGHT OF"
Input "PRISM="H
(S*S*√(3))/4→B
BH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Lbl 113
Disp "AREA OF"
Input "BASE="B
Disp ""
Input "HEIGHT=",H
BH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Lbl 114
Goto 13

Lbl 103
ClrHome
Input "RADIUS=",R
Disp ""
Input "HEIGHT=",H
πRRH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop

Lbl 104
ClrHome
Disp ""
Output(3,2,"ENTER ZERO FOR")
Output(4,2,"UNKNOWN VALUES")
Output(8,3,"press  enter")
Pause
ClrHome
Disp "RADIUS OF"
Input "BASE=",R
Disp ""
Input "HEIGHT=",H
Disp ""
Disp "SLANT"
Input "HEIGHT=",S
If R>0 and H>0
Then
(πRRH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If R>0 and S>0
Then
√(S²-R²)→H
(πRRH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If H>0 and S>0
Then
√(S²-H²)→S
(πRRH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
End

Lbl 105
ClrHome
Disp ""
Output(3,2,"ENTER ZERO FOR")
Output(4,2,"UNKNOWN VALUES")
Output(8,3,"press  enter")
Pause
ClrHome
Input "BASE EDGE=,S
Disp ""
Input "HEIGHT=",H
Disp ""
Input "SLANT HEIGHT=",L
Disp ""
Disp "RADIUS OF"
Input "BASE=",D
If S>0 and H>0
Then
S²→A
AH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If S>0 and L>0
Then
S/√(2)→D
√(L²-D²)→H
(SSH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If D>0 and H>0
Then
D*√(2)→S
S²→A
AH→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If H>0 and L>0
Then
√(L²-H²)→D
D*√(2)→S
(SSH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
If D>0 and L>0
Then
D*√(2)→S
√(L²-D²)→H
(SSH)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop
Else
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
End

Lbl 106
ClrHome
Input "RADIUS=",R
(4πRRR)/3→V
ClrHome
Disp "VOLUME="
Output(1,8,round(V,4))
Disp ""
Disp "  CUBIC UNITS"
Stop

Lbl 107
Goto 0

Lbl 14
ClrHome
Menu("VOLUME:","CUBE",111,"REGULAR PRISM",112,"CYLINDER",113,"CONE",114,"SQUARE PYRAMID",115,"SPHERE",116,"RETURN",117)

Lbl 111
ClrHome
Input "SIDE LENGTH=",S
6*S²→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 112
ClrHome
Menu("PRISM TYPE:","RECTANGULAR",121,"TRIANGULAR",122,"OTHER",123,"RETURN",124,"EXIT",99)

Lbl 121
ClrHome
Input "LENGTH=",L
Disp ""
Input "WIDTH=",W
Disp ""
Input "HEIGHT=",H
2LW+2LH+2WH→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 122
ClrHome
Disp "REGULAR TRIANGLE"
Disp ""
Disp "SIDE LENGTH OF"
Input "TRIANGLE=",S
Disp ""
Disp "HEIGHT OF"
Input "PRISM="H
(S*S*√(3))/4→B
2B+(3SH)→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 123
Disp "AREA OF"
Input "BASE="B
Disp ""
Disp "PERIMETER OF"
Input "BASE=",P
Disp ""
Input "HEIGHT=",H
PH→A
A+2B→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Lbl 124
Goto 14

Lbl 113
ClrHome
Input "RADIUS=",R
Disp ""
Input "HEIGHT=",H
πRR→B
2πRH→A
A+2B→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 115
ClrHome
Disp ""
Output(3,2,"ENTER ZERO FOR")
Output(4,2,"UNKNOWN VALUES")
Output(8,3,"press  enter")
Pause
ClrHome
Disp "RADIUS OF"
Input "BASE=",R
Disp ""
Input "HEIGHT=",H
Disp ""
Disp "SLANT"
Input "HEIGHT=",S
If R>0 and H>0
Then
√(H²+R²)→L
πR(R+L)→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Else
If L>0 and H>0
Then
√(L²+H²)→R
πR(R+L)→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Else
If L>0 and R>0
Then
πR(R+L)→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop
Else
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
End

Lbl 115
ClrHome
Input "BASE EDGE=,S
Disp ""
Input "HEIGHT=",H
Disp ""
Disp "SLANT"
Input "HEIGHT=",L
S²+2S*√((S²/4)+H²)→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 116
ClrHome
Input "RADIUS=",R
4πRR→A
ClrHome
Disp "SURFACE"
Disp "AREA="
Output(2,6,round(A,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 117
Goto 0


2. 5724 KB

Code:

Lbl 0
ClrHome
Menu("PROPERTIES","EXPONENTS",1,"LOGARITHMS",2,"TRIGONOMETRY",3,"EXIT",99)

Lbl 1
ClrHome
Menu("EXPONENTS:","ZERO/NEGATIVE",11,"MULTIPLICATION",12,"DIVISION",13,"PARENTHESES",14,"RATIONAL",15,"RETURN",16,"EXIT",99)

Lbl 11
ClrHome
Disp "       0        "
Disp "    (A)  = 1    "
Disp "                "
Disp "----------------"
Disp "     ­b    1    "
Disp "   (A)  = ---   "
Disp "         (A)^b  "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 12
ClrHome
Disp "  b   c   (b+c) "
Disp " A * A =(A)     "
Disp "                "
Disp "----------------"
Disp "  c   c     (c) "
Disp " A * B =(A*B)   "
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 13
ClrHome
Disp "                "
Disp "    b           "
Disp " (A)     (b-c)  "
Disp " ---- =(A)      "
Disp "    c           "
Disp " (A)            "
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 14
ClrHome
Disp " /  b\^c   (bc) "
Disp " \(A)/ = (A)    "
Disp "                "
Disp "----------------"
Disp " / A \^c  /A^c\ "
Disp "( --- ) =( --- )"
Disp " \ B /    \B^c/ "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 15
ClrHome
Disp "   (1/x)        "
Disp " (A)    = √(A) "
Disp "                "
Disp "----------------"
Disp "  (b/x)         "
Disp "(A)    = √(A^b)"
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop
Lbl 16
Goto 0

Lbl 99
Stop

Lbl 2
ClrHome
Menu("LOGARITHMS:","1 , 0 , < 0",21,"REARRANGE",22,"SIMPLIFY",23,"NATURAL LOG.",24,"RETURN",16,"EXIT",99)

Lbl 21
ClrHome
Disp "  LOG (1) = 0   "
Disp "     b          "
Disp "----------------"
Disp "LOG (0)  LOG (-)"
Disp "   b   or   b   "
Disp "                "
Disp "  =*UNDEFINED*  "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 22
ClrHome
Disp "   LOG (A)=x    "
Disp "      b         "
Disp " IS THE SAME AS "
Disp "                "
Disp "      x         "
Disp "   (B)  = A     "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "   LOG (A)=x    "
Disp "      b         "
Disp " IS THE SAME AS "
Disp "                "
Disp "     (x)        "
Disp "   (B)  = A     "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "   LOG (A^c)    "
Disp "      b         "
Disp "       =        "
Disp "                "
Disp "   C*LOG (A)    "
Disp "        b       "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "                "
Disp "            1    "
Disp "LOG (A) =-------"
Disp "   b     LOG (B)"
Disp "            a   "
Disp "                "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "                "
Disp "         LOG (A)"
Disp "            x   "
Disp "LOG (A) =-------"
Disp "   b     LOG (B)"
Disp "            x   "
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 23
ClrHome
Disp "  LOG (A) = 1   "
Disp "     a          "
Disp "SO:             "
Disp "                "
Disp "  LOG (A^b)= b  "
Disp "     a          "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "   LOG (A*B)    "
Disp "      x         "
Disp "       =        "
Disp "LOG (A)+ LOG (B)"
Disp "   x        x   "
Disp "                "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "   LOG (A/B)    "
Disp "      x         "
Disp "       =        "
Disp "                "
Disp "LOG (A)- LOG (B)"
Disp "   x        x   "
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 24
ClrHome
Disp " = 2.7182818284"
Disp "   LOG (A)=x    "
Disp "               "
Disp " IS THE SAME AS "
Disp "   x   or       "
Disp "() =A   ln(A)=x"
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "ln(0)= UNDEFINED"
Disp "----------------"
Disp "    ln()= 1    "
Disp "SO:             "
Disp "                "
Disp "   ln(^a)= a   "
Disp "                "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 3
ClrHome
Menu("TRIGONOMETRY:","SINE",31,"COSINE",32,"TANGENT",33,"IDENTITIES",34,"PARENT GRAPHS",40,"RETURN",16,"EXIT",99)

Lbl 31
ClrHome
Disp "                "
Disp "          OPP   "
Disp "  sinθ = -----  "
Disp "          HYP   "
Disp "                "
Disp "                "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "           1    "
Disp "  cscθ = -----  "
Disp "          sinθ  "
Disp "----------------"
Disp "          HYP   "
Disp "  cscθ = -----  "
Disp "          OPP   "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 32
ClrHome
Disp "                "
Disp "          ADJ   "
Disp "  cosθ = -----  "
Disp "          HYP   "
Disp "                "
Disp "                "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "           1    "
Disp "  secθ = -----  "
Disp "          cosθ  "
Disp "----------------"
Disp "          HYP   "
Disp "  secθ = -----  "
Disp "          ADJ   "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 33
ClrHome
Disp "                "
Disp "          OPP   "
Disp "  tanθ = -----  "
Disp "          ADJ   "
Disp "                "
Disp "                "
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "           1    "
Disp "  cotθ = -----  "
Disp "          tanθ  "
Disp "----------------"
Disp "          ADJ   "
Disp "  cotθ = -----  "
Disp "          OPP   "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 34
ClrHome
Disp "----------------"
Disp "sin²θ + cos²θ =1"
Disp "----------------"
Disp "tan²θ +1 = sec²θ"
Disp "----------------"
Disp "cot²θ +1 = csc²θ"
Disp "--press--enter--"
Output(8,1,"for--next--page-")
Pause
ClrHome
Disp "          sinθ  "
Disp "  tanθ = ------ "
Disp "          cosθ  "
Disp "----------------"
Disp "          cosθ  "
Disp "  cotθ = ------ "
Disp "          sinθ  "
Output(8,1,"--press--enter--")
Pause
ClrHome
Stop

Lbl 40
FnOff
FnOn 0
DelVar Y₀
CoordOn
AxesOn
PlotsOff
Radian
ZTrig
ClrHome
Menu("GRAPH:","y=sin(x)",41,"y=cos(x)",42,"y=tan(x)",43,"NEXT",50,"RETURN",3,"EXIT",99)
Lbl 50
ClrHome
Menu("GRAPH:","y=csc(x)",51,"y=sec(x)",52,"y=cot(x)",53,"NEXT",60,"BACK",40,"RETURN",3,"EXIT",99)
Lbl 60
ClrHome
Menu("GRAPH:","y=arcsin(x)",61,"y=arccos(x)",62,"y=arctan(x)",63,"BACK",50,"RETURN",3,"EXIT",99)

Lbl 41
"sin(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 42
"cos(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 43
"tan(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 51
"1/sin(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 52
"1/cos(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 53
"1/tan(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 61
"sin(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 62
"cos(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 63
"tan(X)"→Y₀
DispGraph
Pause
ClrHome
Goto 70

Lbl 70
FnOff 0
DelVar Y₀
Degree
ZStandard
Stop


3. 5724 KB

Code:

ClrHome
Output(1,1,"FOR TRIANGLE ABC")
Output(2,1,"----------------")
Output(3,1,"A=")
Output(3,6,"ANGLE OF")
Output(4,6,"VERTEX A")
Output(5,1,"----------------")
Output(6,1,"a=")
Output(6,5,"SIDE ACROSS")
Output(7,4,"FROM VERTEX A")
Output(8,1,"--press--enter--")
Pause

Lbl 0
ClrHome
Menu("TRIANGLE NATURE:","RIGHT",1,"OBLIQUE",2,"EXIT",99)


Lbl 99
Stop

Lbl 1
ClrHome
Menu("RIGHT TRIANGLE:","SOLVE",50,"SPECIAL CASE",51,"AREA",53,"RETURN",52,"EXIT",99)

Lbl 52
Goto 0

Lbl 53
ClrHome
Input "BASE=",B
Disp ""
Input "HEIGHT=",H
ClrHome
Disp "AREA="
Output(1,6,round((BH)/2,4))
Disp ""
Disp " SQUARED  UNITS"
Stop

Lbl 50
Goto 60

Lbl 51
Menu("SPECIAL CASE:","45°-45°-90°",55,"30°-60°-90°",56,"RETURN",57,"EXIT",99)

Lbl 57
Goto 1

Lbl 55
ClrHome
Disp "LEG a="
Output(1,7,"X")
Disp " Angle A="
Output(2,10,"45°")
Disp "LEG b="
Output(3,7,"X")
Disp " Angle B="
Output(4,10,"45°")
Disp "HYP.="
Output(5,6,"X*√(2)")
Stop

Lbl 56
ClrHome
Disp "LEG a="
Output(1,7,"X")
Disp " Angle A="
Output(2,10,"30°")
Disp "LEG b="
Output(3,7,"X*√(3)")
Disp " Angle B="
Output(4,10,"60°")
Disp "HYP.="
Output(5,6,"2*X")
Stop

Lbl 60
ClrHome
Menu("ANGLE UNIT:","DEGREES",3,"RADIANS",4,"RETURN",9,"EXIT",99)



Lbl 3
Degree
90→F
Goto 8

Lbl 4
Radian
π/2→F
Goto 8

Lbl 9
Goto 1


Lbl 8
ClrHome
Disp ""
Output(3,2,"ENTER ZERO FOR")
Output(4,2,"UNKNOWN VALUES")
Output(8,3,"press  enter")
Pause
ClrHome
Disp "HYPOTENUSE"
Input "LENGTH= ",C
ClrHome
Input "LEG a= ",A
Input "ANGLE A= ",D
Disp ""
Input "LEG b= ",B
Input "ANGLE B= ",E

If A+B>C or E+D>F
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Degree
Stop

Else
If A>0 and (E>0 and E<F)
Then
F-E→D
(A*sin(F))/(sin(D))→C
√(C²-A²)→B
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If A>0 and (D>0 and D<F)
Then
F-D→E
(A*sin(F))/(sin(D))→C
√(C²-A²)→B
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If B>0 and (E>0 and E<F)
Then
F-E→D
(B*sin(F))/(sin(E))→C
√(C²-B²)→A
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If B>0 and (D>0 and D<F)
Then
F-D→E
(B*sin(F))/(sin(E))→C
√(C²-B²)→A
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If C>0 and (E>0 and E<F)
Then
F-E→D
(C*sin(D))/(sin(F))→A
√(C²-A²)→B
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If C>0 and (D>0 and D<F)
Then
F-D→E
(C*sin(D))/(sin(F))→A
√(C²-A²)→B
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If A>0 and B>0
Then
√(A²+B²)→C
sin((A*sin(F))/C)→D
F-D→E
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If (B>0 and C>0) and C>B
Then
√(C²-B²)→A
(sin((A*sin(F))/C))→D
F-D→E
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If (A>0 and C>0) and C>A
Then
√(C²-A²)→B
(sin((A*sin(F))/C))→D
F-D→E
ClrHome
Disp "LEG a="
Output(1,7,round(A,4))
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7,round(B,4))
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6,round(C,4))
Degree
Stop

Else
If E>0 and D>0 and A=0 and B=0 and C=0
Then
ClrHome
Disp "LEG a="
Output(1,7," ?")
Disp " Angle A="
Output(2,10,round(D,4))
Disp "LEG b="
Output(3,7," ?")
Disp " Angle B="
Output(4,10,round(E,4))
Disp "HYP.="
Output(5,6," ?")
Degree
Stop

Else
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Degree
Stop

End


Lbl 2
ClrHome
Menu("ANGLE UNIT:","DEGREES",20,"RADIANS",21,"RETURN",22,"EXIT",99)

Lbl 20
Degree
180→G
Goto 10

Lbl 21
Radian
π→G
Goto 10

Lbl 22
Goto 0


Lbl 10
ClrHome
Menu("GIVEN:","SSS",11,"SAS",12,"ASA",13,"AAS",14,"SSA",15,"RETURN",16,"EXIT",99)

Lbl 16
Goto 2

Lbl 11
ClrHome
Input "SIDE a= ",A
Disp ""
Input "SIDE b= ",B
Disp ""
Input "SIDE c= ",C
cos((A²-B²-C²)/(­2BC))→D
cos((B²-A²-C²)/(­2AC))→E
cos((C²-A²-B²)/(­2AB))→F
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop

Lbl 12
ClrHome
Input "SIDE A= ",A
Disp ""
Input "GIVEN ANGLE= ",F
Disp ""
Input "SIDE B= ",B
If F>G
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Stop
Else
√(A²+B²-(2AB)*(cos(F))→C
cos((A²-B²-C²)/(­2BC))→D
cos((B²-A²-C²)/(­2AC))→E
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop
End

Lbl 13
ClrHome
Input "1ST ANGLE= ",F
Disp ""
Input "GIVEN SIDE= ",B
Disp ""
Input "2ND ANGLE= ",D
If B>G
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Stop
Else
G-F-D→E
(B*sin(F))/(sin(E))→C
(C*sin(D))/(sin(F))→A
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop
End

Lbl 14
ClrHome
Disp "ANGLE ACROSS"
Disp "FROM GIVEN"
Input "SIDE=",F
Disp ""
Input "2ND ANGLE= ",D
Disp ""
Input "GIVEN SIDE= ",C
If F>G or D>G
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Stop
Else
G-F-D→E
(C*sin(D))/(sin(F))→A
(C*sin(E))/(sin(F))→B
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop
End

Lbl 15
ClrHome
Output(2,2,"THERE MAY BE")
Output(3,2,"TWO SOLUTIONS")
Output(8,3,"press  enter")
Pause
ClrHome
Disp "SIDE ACROSS FROM"
Input "GIVEN ANGLE= ",C
Disp ""
Input "2ND SIDE= ",A
Disp ""
Input "GIVEN ANGLE= ",F

If ((A*sin(F))/C)>1 or ((A*sin(F))/C)≤0
Then
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,3,"NO SOLUTION")
Degree
Stop

Else
If F>G
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Output(3,4,"DIMENSIONS")
Stop
Else
(sin((A*sin(F))/C))→D
D→Q
G-F-D→E
E→R
(C*sin(E))/(sin(F))→B
B→O
G-D→Z
If (Z+F)>G
Then
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop

Else
(sin((A*sin(F))/C))→D
G-F-D→E
(C*sin(E))/(sin(F))→B
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Output(7,1,"PRESS ENTER FOR")
Output(8,1,"SECOND SOLUTION")
G-D→D
G-F-D→E
(C*sin(E))/sin(F)→B
Pause
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"a=")
Output(1,3,round(A,2))
Output(1,9,"A=")
Output(1,11,round(D,2))
Output(3,1,"b=")
Output(3,3,round(B,2))
Output(3,9,"B=")
Output(3,11,round(E,2))
Output(5,1,"c=")
Output(5,3,round(C,2))
Output(5,9,"C=")
Output(5,11,round(F,2))
Degree
Stop
End


4. 4044 KB

Code:

ClrHome
Disp "NO MORE THAN 25:"
Disp ""
Disp "HOW MANY"
Input "NUMBERS? ",Z
If Z≤1 or Z>25
Then
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop
Else
Goto 0
End

Lbl 0
ClrHome
Disp "NUMBERS="
Input ":",A
Goto 1

Lbl 1
If Z=2
Then
Input ":",B
{A,B}→L₅
Goto 10
Else

If Z=3
Then
Input ":",B
Input ":",C
{A,B,C}→L₅
Goto 10
Else

If Z=4
Then
Input ":",B
Input ":",C
Input ":",D
{A,B,C,D}→L₅
Goto 10
Else

If Z=5
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
{A,B,C,D,E}→L₅
Goto 10
Else

If Z=6
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
{A,B,C,D,E,F}→L₅
Goto 10
Else

If Z=7
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
{A,B,C,D,E,F,G}→L₅
Goto 10
Else

If Z=8
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
{A,B,C,D,E,F,G,H}→L₅
Goto 10
Else

If Z=9
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
{A,B,C,D,E,F,G,H,I}→L₅
Goto 10
Else

If Z=10
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
{A,B,C,D,E,F,G,H,I,J}→L₅
Goto 10
Else

If Z=11
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
{A,B,C,D,E,F,G,H,I,J,K}→L₅
Goto 10
Else

If Z=12
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
{A,B,C,D,E,F,G,H,I,J,K,L}→L₅
Goto 10
Else

If Z=13
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
{A,B,C,D,E,F,G,H,I,J,K,L,M}→L₅
Goto 10
Else

If Z=14
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
{A,B,C,D,E,F,G,H,I,J,K,L,M,N}→L₅
Goto 10
Else

If Z=15
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O}→L₅
Goto 10
Else

If Z=16
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P}→L₅
Goto 10
Else

If Z=17
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q}→L₅
Goto 10
Else

If Z=18
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R}→L₅
Goto 10
Else

If Z=19
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S}→L₅
Goto 10
Else

If Z=20
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T}→L₅
Goto 10
Else

If Z=21
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
Input ":",U
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U}→L₅
Goto 10
Else

If Z=22
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
Input ":",U
Input ":",V
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V}→L₅
Goto 10
Else

If Z=23
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
Input ":",U
Input ":",V
Input ":",W
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W}→L₅
Goto 10
Else

If Z=24
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
Input ":",U
Input ":",V
Input ":",W
Input ":",X
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X}→L₅
Goto 10
Else

If Z=25
Then
Input ":",B
Input ":",C
Input ":",D
Input ":",E
Input ":",F
Input ":",G
Input ":",H
Input ":",I
Input ":",J
Input ":",K
Input ":",L
Input ":",M
Input ":",N
Input ":",O
Input ":",P
Input ":",Q
Input ":",R
Input ":",S
Input ":",T
Input ":",U
Input ":",V
Input ":",W
Input ":",X
Input ":",Y
{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y}→L₅
Goto 10
Else
ClrHome
Disp ""
Disp ""
Disp ""
Output(2,5,"INVALID")
Stop

End


Lbl 10
ClrHome
Menu("FUNCTIONS","MEAN / AVERAGE",11,"MEDIAN",12,"MODE",13,"ARRANGE",14,"EXIT",99)

Lbl 11
mean(L₅)→Z
ClrHome
Output(1,1,"MEAN / AVERAGE=")
Output(3,6,round(Z,4))
Output(8,3,"press  enter")
Pause
Goto 10

Lbl 12
median(L₅)→Z
ClrHome
Output(2,2,"MEDIAN=")
Output(2,10,round(Z,4))
Output(8,3,"press  enter")
Pause
Goto 10

Lbl 13
ClrHome
Disp "MODE= MOST"
Disp "OCCURRING NUMBER"
Disp "----------------"
SortA(L₅)
Output(4,1,L₅)
Output(8,1,"--press--enter--")
Pause
Goto 10

Lbl 14
ClrHome
Menu("ARRANGE BY::","ASCENDING",15,"DESCENDING",16,"RETURN",17,"EXIT",99)

Lbl 15
ClrHome
SortA(L₅)
Output(1,1,L₅)
Output(8,3,"press  enter")
Pause
Goto 10

Lbl 16
ClrHome
SortD(L₅)
Output(1,1,L₅)
Output(8,3,"press  enter")
Pause
Goto 10

Lbl 17
Goto 10

Lbl 99
Stop


5. 2254 KB

Code:

Float
ClrHome
Lbl 0
Menu("FUNCTIONS","EQUATION",1,"CIRCUMFERENCE",2,"AREA",3,"ARC LENGTH",4,"SECTOR AREA",5,"EXIT",99)

Lbl 1
Input "CENTER (X)=",H
Input "ENTER (Y)=",K
Input "RADIUS=",R
ClrHome
Disp "(X-H)²+(Y-K)²=R²
Disp ""
Disp ""
Disp ""
Output(3,4,"H=")
Output(3,7,H)
Output(4,4,"K=")
Output(4,7,K)
Output(3,10,"R=")
Output(3,13,R)
Stop

Lbl 2
Input "RADIUS=",R
ClrHome
Disp " CIRCUMFERENCE="
Disp ""
Disp ""
Disp ""
Disp ""
Output(3,4,"π*"
Output(3,6,round(2R,4))
Output(3,10,"UNITS")
Output(4,8,"OR")
Output(5,6,round(2πR,4)
Stop

Lbl 3
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"AREA=")
Output(3,2,"π*")
Output(3,4,round(R²,4))
Output(4,3,"OR")
Output(5,2,round(πR²,4))
Output(3,10,"SQUARED")
Output(4,11,"UNITS")
Stop

Lbl 4
ClrHome
Menu("ANGLE UNIT","DEGREES",7,"RADIANS",8,"PERCENT",11,"FRACTION",12,"BACK",9,"EXIT",99)

Lbl 7
Degree
Input "ANGLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,3,"ARC LENGTH=")
Output(1,1,"*NOT SIMPLIFIED*")
Output(3,1,"π*")
Output(3,3,2AR)
Output(3,8,"/360")
Output(4,4,"OR")
Output(5,1,round(2πRA/360,4))
Output(5,12,"UNITS")
Stop
 
Lbl 8
Radian
Input "ANGLE=",A
A/π→A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,3,"ARC LENGTH=")
Output(3,1,"π*")
Output(3,3,round(AR,2))
Output(4,4,"OR")
Output(5,1,round(πAR,4))
Output(5,12,"UNITS")
Degree
Stop

Lbl 11
ClrHome
Disp "PERCENT OF"
Input "CIRCLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"*NOT SIMPLIFIED*")
Output(2,3,"ARC LENGTH=")
Output(3,1,"π*π)
Output(3,3,round(AR,2))
Output(3,8,"/50")
Output(4,4,"OR")
Output(5,1,round(πAR/50,4))
Output(5,12,"UNITS")
Stop

Lbl 12
ClrHome
Disp "FRACTION OF"
Input "CIRCLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,3,"ARC LENGTH=")
Output(3,1,"π*")
Output(3,3,round(2AR,4))
Output(4,4,"OR")
Output(5,1,round(2πAR,4))
Output(5,12,"UNITS")
Stop

Lbl 9
Goto 0

Lbl 5
Menu("ANGLE UNIT","DEGREES",13,"RADIANS",14,"PERCENT",15,"FRACTION",16,"BACK",9,"EXIT",99)

Lbl 13
Degree
ClrHome
Input "ANGLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"*NOT SIMPLIFIED*")
Output(2,1,"AREA OF SECTOR=")
Output(3,1,"π*")
Output(3,3,round(AR²,2))
Output(3,7,"/360")
Output(4,4,"OR")
Output(5,1,round(AπR²/360,4)
Output(4,10,"SQUARED")
Output(5,12,"UNITS")
Stop

Lbl 14
Radian
Input "ANGLE=",A
A/π→A
Disp ""
Input "RADIUS=",R
ClrHome
Disp "*NOT SIMPLIFIED*"
Disp "AREA OF SECTOR="
Disp ""
Disp ""
Disp ""
Output(3,1,"π*")
Output(3,3,round(AR²,2))
Output(3,9,"/2")
Output(4,4,"OR")
Output(5,1,round(AπR²/2,4))
Output(4,10,"SQUARED")
Output(5,12,"UNITS")
Degree
Stop

Lbl 15
ClrHome
Disp "PERCENT OF"
Input "CIRCLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp "*NOT SIMPLIFIED*"
Disp ""
Disp ""
Disp ""
Disp ""
Output(2,1,"AREA OF SECTOR="
Output(3,1,"π*")
Output(3,3,AR²)
Output(3,9,"/100")
Output(4,4,"OR")
Output(5,1,round(πR²A/100,4)
Output(4,10,"SQUARED")
Output(5,12,"UNITS")
Stop

Lbl 16
ClrHome
Disp "FRACTION OF"
Input "CIRCLE=",A
Disp ""
Input "RADIUS=",R
ClrHome
Disp ""
Disp ""
Disp ""
Disp ""
Disp ""
Output(1,1,"AREA OF SECTOR="
Output(3,1,"π*")
Output(3,3,round(AR²,4))
Output(4,4,"OR")
Output(5,1,round(AπR²,4)
Output(4,10,"SQUARED")
Output(5,12,"UNITS")
Stop

Lbl 99
Stop
I strongly suggest you use xLIB's ExecArcPrgm from its Third-Party Libraries via Doors CS. Just give your main program the necessary header to make it require Doors CS and xLIB, then you'll be able to use that function to copy archived programs into temporary RAM programs, run them, and delete the temporary copy.
In general, using loops instead of Lbl:Goto is better structure, but in this case labels are good because you can use Menu(. The structure is okay.

* Much of your program #4 can be replaced with this list input routine:

Code:
Disp "ENTER NUMS","SEPARATED BY ,
Input Str1
expr("{"+Str1->L5

which is like Input L5, except the users doesn't need to enter braces. This has the advantage that the user won't need to retype twenty-three numbers after a mistype on the twenty-fourth.

* Closing quotation marks and parentheses are unnecessary at the end of a line. Some people think it's bad practice to remove them, but you have about a kilobyte of them.
* Disp "" is unnecessary if you won't be using any more Disp commands until the next ClrHome.
* Lbl 42: Goto 32 is unnecessary. Just make the menu go to label 32 instead of 42.
* Make a label like this:

Code:
Lbl A
ClrHome
Disp "AREA=
Output(1,6,round(A,4
Disp "
Disp "UNITS²
Stop

and just Goto A wherever you display the area, instead of repeating the area-displaying code.
I suggest not using the stop command in the middle of the program. It causes the program to abruptly stop and exit the program unexpectedly. Have a label that goes to the end of the program and it just smoothly ends the program.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement