Four things:
- "DarkerLine." He went out of his way to help you, so the least you could do is spell his name right.
- Because of some very long lines in your post, a horizontal scrollbar was created, and the edit/quote buttons were pushed well outside of the browser window. I edited your post to split these long lines into two lines, and even used a "..." to indicate where.
- Emoticons. Disable them under "Post Options" whenever they crop up inside your code (ex: √(AB) produces √(A).
- Explain the line numbering to me again?
I'm going to copy, search/replace as necessary, and then paste the original code here to give myself and others a chance to start fresh with the original code (without comments), and just to be certain that it will function the same way as the author intended. Be aware that this will also carry over the mistakes that the author made, such as the extra closing parentheses in lines 70 and 174 (both of which will cause errors), and various spelling mistakes.
Code: ClrHome
Output(3,3,"MATH PROGRAM"
Output(5,2,"BY: LARS WEBB"
Pause
ClrHome
Lbl Z
ClrHome
Menu("MATH PROG","3-D",1,"2-D",2,"QUIT",4
Lbl 4
Output(4,3,"ENJOY CLASS"
Pause
ClrHome
Stop
End
Lbl 1
Menu("3-D","CUBE",1A,"BOX",1B,"PYRAMID",1C,"CYLINDER",1D,"SPHERE",1E,"CONE",1F,"MORE",5
Lbl 5
Menu("MORE 3-D","SPHERICAL SECTOR",1G,"1 BASE SEGMENT OF SPHERE",1H,...
..."2 BASE SEGMENT OF SPHERE",1I,"TOPLESS CONE",1J,"PRISM",1K,"FRUSTUM(PYRAMID)",1L,"BACK",6
Lbl 6
Goto 1
Lbl 1A
Menu("CUBE","SURFACE AREA",A,"VOLUME",B
Lbl B
Input "SIDE LENGTH=",S
S³→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl A
Input "SIDE=",S
6S²→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1B
Menu("BOX","SURFACE AREA",C,"VOLUME",D
Lbl D
Prompt A,B,C
ABC→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl C
Prompt A,B,C
2(AB+BC+AC)→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1C
Menu("PYRAMID","AREA (SQUARE)",E,"AREA (TRIANGLEL",W,"VOLUME",F
Lbl F
Input "AREA OF BASE=",B
Input "ALTITUDE=",A
AB/3→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl E
Input "LATERAL HEIGHT",A
Input "SIDE OF BASE=",C
C²→V
4CA/2→R
V+R→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl W
Input "LATERAL HEIGHT",A
Input "SIDE OF BASE=",C
√(3)C)/4→L
(C3A)/2→M
L+M→Z
Disp "SURFACE AREA",Z
Pause
Goto Z
Lbl 1D
Menu("CYLINDER","SURFACE AREA",G,"VOLUME",H
Lbl H
Input "RADIUS=",R
Input "HEIGTH=",H
πR²H→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl G
Input "RADIUS=",R
Input "HEIGHT=",H
2πR(R+H)→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1E
Menu("SPHERE","SURFACE AREA",I,"VOLUME",J
Lbl J
Input "RADIUS=",R
(4/3)*(πR³))→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl I
Input "RADIUS=",R
4πR²→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1F
Menu("CONE","SURFACE AREA",K,"VOLUME",L
Lbl L
Input "AREA OF BASE=",A
Input "HEIGHT=",H
AH/3→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl K
Input "RADIUS=",R
Input "HEIGHT=",H
πR²+πRH→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1G
Input "RADIUS=",R
Input "HEIGHT=",H
(πR²H)*(2/3)→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl 1H
Menu("1 BASE SEGMENT OF A SPHERE","SURFACE AREA",M,"VOLUME IS",N
Lbl N
Input "RADIUS=",R
Input "HEIGHT=",H
(πH²(3R-H))/3→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl M
Input "RADIUS=",R
Input "HEIGHT=",H
2πRH→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1I
Menu("2 SEGMENTBASE OF A SPHERE","SURFACE AREA",O,"VOLUME",P
Lbl P
Prompt A,B,H
(πH(3A²+3B²+H²))/6→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl O
Input "RADIUS=",R
Input "HEIGHT=",H
2πRH→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1J
Menu("TOPLESS CONE","SURFACE AREA",Q,"VOLUME",R
Lbl R
Input "RADIUS ONE=",R
Input "RADIUS TWO=",A
Input "HEIGHT=",H
(H/3)((πR²)²+(πA²)²+√((πR²)(πA²)→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl Q
Input "RADIUS 1=",R
Input "RADIUS 2=",A
Input "HEIGHT=",H
π(R²+A²+(R+A)√(R-A)²+H))→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1K
Menu("PRISM","SURFACE AREA",U,"VOLUME",T
Lbl T
Input "AREA OF BASE=",B
Input "ALTITUDE=",A
AB→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl U
Input "AREA OF BASE=",A
Input "NUMBER OF SIDES=",N
Input "AREA OF SIDE=",S
2A+SN→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 1L
Menu("FRUSTUM(PYRIMAD)","SURFACE AREA",8A,"VOLUME",8B
Lbl 8A
Input "BASE 1 LENGTH",A
Input "BASE 1 WIDTH",B
Input "BASE 2 LENGTH",C
Input "BASE 2 WIDTH",D
Input "HEIGHT",H
AB+CD→V
(A+C)H/2→U
(B+D)H/H→T
2U+2T+V→Z
Disp "SURFACE AREA IS",Z
Pause
Goto Z
Lbl 8B
Input "AREA OF BASE 1=",A
Input "AREA OF BASE 2=",B
Input "HEIGHT=",H
(H/3)(A+B+√(AB)→Z
Disp "VOLUME IS",Z
Pause
Goto Z
Lbl 2
Menu("2-D","RIGHT TRI",2A,"EQUAL TRI",2B,"TRIANGLE",2C,"DIAGNOL PERP",2D,...
..."RECTANGLE",2E,"RHOMBUS",2F,"MORE",7
Lbl 7
Menu("MORE 2-D","TRAPEZIOD",2G,"QUAD",2H,"POLYGON",2I,"CIRCLE",2J,"BACK",8
Lbl 8
Goto 2
Lbl 2A
Prompt A,B
(AB)→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2B
Input "SIDE",S
√(3S)/4→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2C
Prompt A,B,C
(A+B+C)/2→S
√(S(S-A)(S-B)(S-C))→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2D
Input "DIAGNOL 1=",D
Input "DIAGNOL 2=",A
(DA)/2→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2E
Prompt B,H
BH→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2F
Input "DIAGONAL ONE=",D
Input "DIAGONAL TWO=",A
(AD)/2→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2G
Prompt A,B,H
((A+B)H)/2→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2H
Prompt A,B,C,D
Input "DIAGNOL ONE=",E
Input "DIAGNOL TWO=",F
(√(4E²F²-(B²+D²-A²-C²)²))/4→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2I
Input "RADIUS=",R
Input "NUMBER OF SIDES=",N
((NR²)(sin(360/N))/2→Z
Disp "AREA IS",Z
Pause
Goto Z
Lbl 2J
Input "RADIUS=",R
πR²→Z
Disp "AREA IS",Z
Pause
Goto Z
Last edited by Guest on 04 Apr 2009 08:53:54 pm; edited 1 time in total |