Oh Ok. Good to know. Thats kind of a pain but I will Change it. Thanks
Hmm, why are you deleting every real variable? It's not like you really need to do that, as storing to a variable will overwrite the contents of that variable.
Aes_Sedia5 wrote:
I Just like to make sure that everything goes smoothly. But I suppose I dont really need that.
No, you definitely don't. Just be aware of properly initializing your variables. Code:
:Lbl A
:Menu("USE","SQUARE",AA,"TRIANGLE",AB,"CIRCLES",AC,"BACK",ST,"EXIT",XX
:Lbl AA
:1→Z
:Goto Y
:Lbl AB
:√(3)*4→Z
:Goto Y
:Lbl AC
:π/8→Z
:Goto Y
:Lbl Y
=
Code:
:Lbl A
:1
:Menu("USE","SQUARE",AA,"TRIANGLE",AB,"CIRCLES",AC,"BACK",ST,"EXIT",XX)
:Lbl AC:π/√(8³6
:Lbl AB:Ans√(48
:Lbl AA:Ans→Z
:Lbl Y
Not to accuse you of finding no amusement in the creative process, but I can see that you're playing it safe. Be more adventurous! – you'll learn more. I offer you an amazing guide, an early version of which helped motivate my career as an optimization nut. It presents a clear window into how much of a playground this language can be, and I encourage you to skim through it slowly, stopping at any section that looks even mildly useful.
I have another question that is not really related but there is no point in making another thread for it.
I also have a tinspire and I am thinking about getting the 84 keypad for it.
if I use it in 84 mode does it use all the ram and archive of the nspire or just a certain partitioned amount.
Also does anyone know how i can get one of those keypads cause i cant find them on ti.education.com
also would it still be able to use all the programs etc that the 84 can?
I think thats all the questions.
Thanks in advance.
I also have a tinspire and I am thinking about getting the 84 keypad for it.
if I use it in 84 mode does it use all the ram and archive of the nspire or just a certain partitioned amount.
Also does anyone know how i can get one of those keypads cause i cant find them on ti.education.com
also would it still be able to use all the programs etc that the 84 can?
I think thats all the questions.
Thanks in advance.
Aes_Sedia5 wrote:
if I use it in 84 mode does it use all the ram and archive of the nspire or just a certain partitioned amount.
It will only use a certain amount of memory that cannot be accessed at all when in Nspire mode.
Aes_Sedia5 wrote:
also would it still be able to use all the programs etc that the 84 can?
Some old assembly programs might not work, since the Nspire doesn't emulate the hidden opcodes. All TI-BASIC programs should work, but please keep in mind that it's much harder to downgrade the OS, and writing directly to flash using asm (normally only used for things like OS mods) is impossible.
OK well the only real asm programs i use is the asm program to archive and unarchive from within programs. If I compile it without using hex could it work.
Or if I could find one written in z80 instead of hex?
If not then I am not sure its worth the hassle cause i write some big programs so I use alot of subprograms that are in the archive.
Or if I could find one written in z80 instead of hex?
If not then I am not sure its worth the hassle cause i write some big programs so I use alot of subprograms that are in the archive.
Please don't double post. If you have something to add to a post, use the Edit button. A double post is when you post, and then post again without anyone saying something between them. A good rule of thumb is, if it has been 24 hours since your last post and no one has responded, you may add another post, else edit the post.
To Player 1537
Thanks I did not even think about it.
Every forum I use automatically merges double posts so I am not used to it. But I will try to remember.
To JosJuice Thanks good to know.
-------------------------------------------------------------------------------
Also If I posted some code here to some rather long programs could I get some feed back as to how to optimize them? There are a few where it seem like there has to be a better way to do things I am just not sure how to make it easier.
Thanks I did not even think about it.
Every forum I use automatically merges double posts so I am not used to it. But I will try to remember.
To JosJuice Thanks good to know.
-------------------------------------------------------------------------------
Also If I posted some code here to some rather long programs could I get some feed back as to how to optimize them? There are a few where it seem like there has to be a better way to do things I am just not sure how to make it easier.
Sorry about the double post but everytime I try to add code to my old post it doesnt type right.
Could you guys look these over and see if there is a way to optimize them and make them more user friendly?
Anyway this first program is for naming organic molecules.
It seems like there has to be an easier way to make this work.
Code:
This next one is all the programs I needed for my year of Trigonomety and pre calculus.
Code:
The next one is just basic algebra that I made oneday when I was extremely bored in math class.
Code:
This one is all volume and area formulas that I made while bored while taking our states standardized test.
Code:
And then the far from final version of my program for the first year of calculus.
Code:
Could you guys look these over and see if there is a way to optimize them and make them more user friendly?
Anyway this first program is for naming organic molecules.
It seems like there has to be an easier way to make this work.
Code:
::"Name Organic Molecules"
:ClrHome
:Lbl ST
:Menu("TYPE","ALKANE",A,"OTHER",B,"EXIT",XX)
:Lbl XX
:Return
:Lbl B
:"PRESS ENTER TO CONTINUE"→Str0
:ClrDraw
:ClrHome
:Lbl 1
:Menu("DOUB BOND O","YES",A,"NO",B,"BACK",XX)
:Lbl XX
:Return
:Lbl A
:Menu("SINGL BOND O","YES",C,"NO",D,"BACK",1,"EXIT",XX)
:Lbl D
:Menu("NITROGEN","YES",E,"NO",F,"BACK",A)
:Lbl E
:Disp "AMIDE"
:Disp "ETHANEAMIDE"
:Disp Str0
:Pause
:Return
:Lbl F
:Menu("WHERE IS DOUBLE BOND O?","END",BC,"MIDDLE",AB,"BACK",D)
:Lbl Z
:Disp "CARBOXYLIC ACID"
:Disp "ETHANOIC ACID"
:Disp Str0
:Pause
:Return
:Lbl Y
:Disp "ESTER"
:Disp "ETHYLBUTANOATE"
:Disp Str0
:Pause
:Return
:Lbl C
:Menu("WHERE IS SINGLE BOND O?","AT END",Z,"IN MIDDLE",Y,"BACK",A)
:Lbl BC
:Disp "ALDEHYDE"
:Disp "ETHANAL"
:Disp Str0
:Pause
:Return
:Lbl AB
:Disp "KETONE"
:Disp "3,PENTANONE"
:Disp Str0
:Pause
:Return
:Lbl B
:Menu("BOND","HALOGEN",W,"SINGLE BOND O",V,"NITROGEN",U,"BACK",A)
:Lbl W
:Disp "HALOALKANE"
:Disp "DICHOLORODIFLUOROMETHANE"
:Disp Str0
:Pause
:Return
:Lbl U
:Disp "AMINE"
:Disp "TRIMETHYLAMINE"
:Disp "ETHYLMETHYLAMINE"
:Disp Str0
:Pause
:Return
:Lbl V
:Menu("WHERE SINGLE BOND O","AT END",N,"IN MIDDLE",O,"BACK",B)
:Lbl N
:Disp "ALCOHOL"
:Disp "PROPANOL"
:Disp Str0
:Pause
:Return
:Lbl O
:Disp "ETHER"
:Disp "DIETHYLETHER"
:Disp Str0
:Pause
:Return
:Goto ST
:Lbl A
:Disp "HIGHEST 10"
:Input "LENGTH OF PARENT",L
:Input "HIGHEST BOND",Z
:If Z>1
:Then
:Disp "MAX 6"
:Input "NUMBER OF THAT BOND",θ
:End
:Disp "MAX 6"
:Input "NUMBER OF BRANCHES",B
:Disp "PUT IN ALPHA ORDER"
:If B=6
:Input "WHERE BRANCH 1",A
:If B=6
:Input "LENGTH OF B 1",C
:If B≥5
:Input "WHERE 2",D
:If B≥5
:Input "LENGTH 2",E
:If B≥4
:Input "WHERE3",F
:If B≥4
:Input "LENGTH3",G
:If B≥3
:Input "WHERE4",H
:If B≥3
:Input "LENGTH4",I
:If B≥2
:Input "W5",J
:If B≥2
:Input "L5",K
:If B≥1
:Input "W6",M
:If B≥1
:Input "L6",N
:If C=4
:Disp A,"BUTYL"
:
:If C=3
:Disp A,"PROPYL"
:If C=2
:Disp A,"ETHYL"
:If C=1
:Disp A,"METHYL"
:Pause
:If E=4
:Disp D,"BUTYL"
:If E=3
:Disp D,"PROPYL"
:Pause
:If E=2
:Disp D,"ETHYL"
:If E=1
:Disp D,"METHYL"
:Pause
:If G=4
:Disp F,"BUTYL"
:If G=3
:Disp F,"PROPYL"
:If G=2
:Disp F,"ETHYL"
:If G=1
:Disp F,"METHYL"
:Pause
:If I=4
:Disp H,"BUTYL"
:If I=3
:Disp H,"PROPYL"
:If I=2
:Disp H,"ETHYL"
:If I=1
:Disp H,"METHYL"
:Pause
:If K=4
:Disp J,"BUTYL"
:If K=3
:Disp J,"PROPYL"
:If K=2
:Disp J,"ETHYL"
:If K=1
:Disp J,"METHYL"
:Pause
:If N=4
:Disp M,"BUTYL"
:If N=3
:Disp M,"PROPYL"
:If N=2
:Disp M,"ETHYL"
:If N=1
:Disp M,"METHYL"
:Pause
:0→O
:0→P
:0→Q
:0→R
:0→S
:0→T
:If Z>1 and θ≥1
:Input "WHERE BOND 1",O
:If θ≥2
:Input "WHERE2",P
:If θ≥3
:Input "WHERE3",Q
:If θ≥4
:Input "WHERE4",R
:If θ≥5
:Input "WHERE5",S
:If θ=6
:Input "WHERE6",T
:Disp O,P,Q,R,S,T
:If L=10
:Disp "DEC"
:If L=9
:Disp "NON"
:If L=8
:Disp "OCT"
:If L=7
:Disp "HEPT"
:If L=6
:Disp "HEX"
:If L=5
:Disp "PENT"
:If L=4
:Disp "BUT"
:If L=3
:Disp "PROP"
:If L=2
:Disp "ETH"
:If L=1
:Disp "METH"
:Pause
:If Z=3
:Disp "YNE"
:If Z=2
:Disp "ENE"
:If Z=1
:Disp "ANE"
:Pause
:Return
:Goto ST
This next one is all the programs I needed for my year of Trigonomety and pre calculus.
Code:
::
:Lbl ST
:ClrHome
:ClrDraw
:ClrTable
:Menu("TRIGONOMETRY","LOGS",A,"RADIANS AND DEGREES",B,"SIN AND COS",C,"PYTHAGOREAN THEREOM",D,"EXIT",XX)
:Lbl XX
:Stop
:Lbl A
:Menu("LOGS","BASE CHANGE",AA,"REWRITE",AB)
:Lbl AA
:Input "ARGUMENT",A
:Input "BASE",B
:log(A)/log(B)→θ
:Disp θ
:Pause
:Goto ST
:Lbl AB
:Menu("LOG REWRITE","FROM LOG",AC,"TO LOG",AD,"BACK",ST)
:Lbl AC
:Input "LOG ARGUMENT",A
:Input "LOG BASE",B
:Input "LOG COEFFICIENT",C
:Input "=?",D
:Disp B,"^",D,"=",C,"^",A
:Pause
:Goto ST
:Lbl AD
:Input "BASE OF EXPONENT",B
:Input "EXPONENT",D
:Input "=Base Of Exponent",C
:Input "=Exponent",A
:Disp A,"log Base",B,"log Argument",C,"=",D
:Pause
:Goto ST
:Lbl B
:Menu("DEGREE AND RADIANS","DEGREE TO RADIANS",BA,"RADIANS TO DEGREE",BB,"FIND POINTS",BC,"BACK",ST)
:Lbl BA
:Degree
:Disp "DO NOT PUT º"
:Input "DEGREE",θ
:θ(π/180)→Z
:Disp "RADIAN",Z
:Pause
:Goto ST
:Lbl BB
:Radian
:Disp "DO NOT PUT π"
:Input "RADIANS",θ
:θπ*(180/π)→Z
:Disp Z,"º"
:Pause
:Goto ST
:Lbl BC
:
:Input "RADIAN OR DEGREE",θ
:If θ=0 or θ=2π or θ=360
:Then
:Disp "(1,0)"
:Pause
:Goto ST
:End
:If θ=30 or θ=π/6
:Then
:Disp "(sqrt(3)/2,(1/2)"
:Pause
:Goto ST
:End
:If θ=45 or θ=π/4
:Then
:Disp "(sqrt(2)/2,sqrt(2)/2)"
:Pause
:Goto ST
:End
:If θ=60 or θ=π/3
:Then
:Disp "(1/2,sqrt(3)/2)"
:Pause
:Goto ST
:End
:If θ=90 or θ=π/2
:Then
:Disp "(1,0)"
:Pause
:Goto ST
:End
:If θ=120 or θ=2π/3
:Then
:Disp "(-1/2,sqrt(3)/2)"
:Pause
:Goto ST
:End
:If θ=135 or θ=(3π/4)
:Then
:Disp "(sqrt(2)/2,sqrt(2)/2)"
:Pause
:Goto ST
:End
:If θ=150 or θ=(5π/6)
:Then
:Disp "(sqrt(3)/2,1/2)"
:Pause
:Goto ST
:End
:If θ=180 or θ=(π)
:Then
:Disp "(-1,0)"
:Pause
:Goto ST
:End
:If θ=210 or θ=(7π/6)
:Then
:Disp "(-sqrt(3)/2,-1/2)"
:Pause
:Goto ST
:End
:If θ=225 or θ=(5π/4)
:Then
:Disp "(-sqrt(2)/2,-sqrt(2)/2)"
:Pause
:Goto ST
:End
:If θ=240 or θ=(4π/3)
:Then
:Disp "(-1/2,-sqrt(3)/2)"
:Pause
:Goto ST
:End
:If θ=270 or θ=(3π/2)
:Then
:Disp "(0,-1)"
:Pause
:Goto ST
:End
:If θ=300 or θ=(5π/3)
:Then
:Disp "(1/2,-sqrt(3)/2)"
:Pause
:Goto ST
:End
:If θ=315 or θ=(7π/4)
:Then
:Disp "(sqrt(2)/2,-sqrt(2)/2)"
:Pause
:Goto ST
:Lbl C
:Menu("SIN AND COS","LAW OF SINES",CA,"ADDITION FORMULA",CC,"HALF ANGLE S/2",CD,"DOUBLE ANGLESIN(2S)",CE,"PERIOD OF CURVE",CF,"BACK",ST)
:Lbl CA
:Degree
:Disp "INPUT ZERO","FOR PIECES","NOT KNOWN"
:Input "SIDE A=",A
:Input "ANGLE A=",Z
:Input "SIDE B=",B
:Input "ANGLE B=",Y
:Input "SIDE C=",C
:Input "ANGLE C=",X
:If A=0 and X=0 and C=0
:Then
:Bsin(Z)/sin(Y)→A
:180-(Z+Y)→θ
:Bsin(θ)/sin(Y)→X
:Disp "SIDE A=",A
:Disp "SIDE C=",X
:Disp "ANGLE C=",θ
:Pause
:Goto ST
:Else
:If C=0 and X=0 and B=0
:Asin(Y)/sin(Z)→B
:180-(Y+Z)→X
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Disp "SIDE B=",B
:Pause
:Goto ST
:Else
:If Z=0 and X=0 and C=0
:Then
:sin{^-1}(Bsin(Z)/A)→Z
:180-(Z+Y)→X
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Disp "ANGLE A=",Z
:Pause
:Goto ST
:Else
:If A=0 and B=0 and Z=0
:Then
:Csin(Y)/sin(X)→B
:180-(Y+X)→Z
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE A=",Z
:Disp "SIDE B=",B
:Pause
:Goto ST
:Else
:If A=0 and Z=0 and Y=0
:Then
:sin{^-1}(Bsin(X)/C)→Y
:180-(X+Y)→Z
:Bsin(Z)/sin(Y)→A
:Disp "SIDE A=",A
:Disp "ANGLE A=",Z
:Disp "ANGLE B="Y
:Pause
:Goto ST
:If A=0 and B=0 and Y=0
:A*sin(X)/sin(Z)→A
:180-(Z+X)→Y
:Asin(Y)/sin(Z)→B
:Disp "SIDE B=",B
:Disp "ANGLE B=",Y
:Disp "SIDE A=",A
:Pause
:Goto ST
:Else
:If Z=0 and B=0 and Y=0
:Then
:sin{^-1}(Asin(X)/C)→Z
:180-(Z+X)→Y
:Csin(Z)/sin(X)→A
:Disp "SIDE A=",A
:Disp "ANGLE B=",Y
:Disp "ANGLE A=",Z
:Pause
:Goto ST
:If Z=0 and C=0 and X=0
:Then
:sin{^-1}(Asin(Y)/B→Z
:180-(Y+Z)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE B=",Y
:Disp "ANGLE A=",Z
:Pause
:Goto ST
:Else
:If A=0 and C=0 and X=0
:Then
:sin{^-1}(Bsin(Z)/sin(Y))→A
:180-(Z+Y)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Disp "SIDE A=",A
:Pause
:Goto ST
:Else
:If B=0 and X=0 and C=0
:Then
:(Asin(Y)/sin(Z))→B
:180-(Y+Z)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Disp "SIDE B=",B
:Pause
:Goto ST
:Else
:If Y=0 and C=0 and X=0
:Bsin(Z)/A→Y
:180-(Z+Y)→X
:Asin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Disp "ANGLE B=",Y
:Pause
:Goto ST
:Else
:If A=0 and Y=0 and X=0
:Then
:B{^2}+C{^2}-2BCcos(X)→A
:sin{^-1}(Asin(X)/C)→Z
:180-(Z+X)→Y
:Disp "ANGLE B=",Y
:Disp "ANGLE A=",Z
:Disp "SIDE A=",a
:Pause
:Goto ST
:Else
:If B=0 and Y=0 and X=0
:Then
:A{^2}+C{^2}-2ACcos(Y)→B
:sin{^-1}(Asin(Y)/B)→Z
:180-(Y+Z)→X
:Disp "ANGLE C=",X
:Disp "ANGLE A=",Z
:Disp "SIDE B=",B
:Pause
:Goto ST
:Else
:If C=0 and Z=0 and Y=0
:Then
:A{^2}+B{^2}-2ABcos(Z)→C
:sin{^-1}(Csin(Z)/A)→X
:180-(Z+X)→Y
:Disp "ANGLE B=",Y
:Disp "ANGLE C=",X
:Disp "SIDE C=",C
:Pause
:Goto ST
:End
:Lbl D
:Disp " ."," .. C"," .b. "," . .","A. ."," .a b."," ......."," B "
:Pause
:Disp "INPUT ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A=",A
:Input "SIDE B=",B
:Input "SIDE C=",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:Disp Z
:Pause
:Goto ST
:Else
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Z
:Disp Z
:Pause
:Goto ST
:Else
:If C=0
:sqrt(A{^2}+B{^2})→Z
:Disp Z
:Pause
:Goto ST
:End
:Lbl CC
:Menu("ADDITION FORMULAS","SIN",1C,"COS",2C,"BACK",C)
:Lbl 1C
:Disp "SIN(S+T)=","SIN(S)COS(T)+","COS(T)SIN(S)"
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:Input "SIN OF T",T
:Input "COSINE OF T",Y
:sin(S)cos(Y)+cos(T)sin(Z)→θ
:Disp θ
:Pause
:Goto ST
:Lbl 2C
:Disp "cos(S+T)=","cos(S)cos(T)-","sin(S)sin(T)"
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:Input "SIN OF T",T
:Input "COSINE OF T",Y
:cos(Z)cos(Y)-sin(S)sin(T)→θ
:Disp θ
:Pause
:Goto ST
:Lbl CD
:Menu("HALF ANGLE FORMULAS","SIN",3C,"COS",4C,"BACK",C)
:Lbl 3C
:Disp "sin(S/2)"
:Input "COSINE OF S",S
:sqrt((1-cos(S)/2)→X
:{-}sqrt((1-cos(S)/2)→Y
:Disp X,Y
:Pause
:Goto ST
:Lbl 4C
:Disp "cos(S/2)"
:Input "S",S
:sqrt((1+cos(S)/2)→X
:{-}sqrt((1+cos(S)/2)→Y
:Disp X,Y
:Pause
:Goto ST
:Lbl CE
:Menu("DOUBLE ANGLE FORMULAS","SIN",5C,"COS",6C,"BACK",C)
:Lbl 5C
:Disp "sin(2S)
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:2sin(S)cos(Z)→θ
:Disp θ
:Pause
:Goto ST
:Lbl 6C
:Disp "cos(2S)"
:Input "SINE OF S",S
:Input "COSINE OF S",Z
:cos(Z){^2}-sin(S){^2}→θ
:Disp θ
:Pause
:Goto ST
:Lbl CF
:Menu("SIN OR TAN","≥","SIN AND COS",FA,"TANGENT",FB,"BACK",ST
:Lbl CG
:Disp "COS(KX)","SIN(KX)
:Disp "INPUT π IF NEEDED"
:Prompt K
:2π/K→θ
:Disp "PERIOD=",θ
:Pause
:Goto CF
:Lbl CH
:Disp "TAN(KX)"
:Disp "INPUT π IF NEEDED"
:Prompt K
:π/K→θ
:Disp "PERIOD=",θ
:Pause
:Goto CF
The next one is just basic algebra that I made oneday when I was extremely bored in math class.
Code:
::
:Lbl ST
:ClrHome
:ClrTable
:ClrDraw
:a+bi
:Menu("FORMULAS","EXPONENTIAL GROWTH",A,"DISTANCE BETWEEN POINTS",B,"DOUBLING TIME",C,"HALF LIFE",D,"INTEREST",E,"MORE",G,"EXIT",XX)
:Lbl XX
:Stop
:Lbl G
:Menu("MORE FORMULAS","LOGS",F,"MID POINT OF A LINE",H,"QUADRATIC FORMULA",I,"SYNTHETIC DIVISION",J,"TRIGONOMETRY",K,"BACK",ST,"EXIT",XX)
:Lbl A
:Menu("EXPONENTIAL GROWTH","CONTINOUS W/{e}",AA,"NON CONTINOUS W/O{e}",AB)
:Lbl AA
:Input "INITIAL AMOUNT",N
:Input "INTEREST RATE",R
:Input "TIME",T
:N{e}^(RT)→θ
:Disp "AMOUNT=",θ
:Pause
:Goto ST
:Lbl AB
:Input "INITIAL AMOUNT",N
:Input "INTEREST RATE",R
:Input "TIME",T
:N(1+R)^T→θ
:Disp "AMOUNT",θ
:Pause
:Goto ST
:Lbl B
:Disp "DISTANCE","BETWEEN","TWO POINTS"
:Input "X1",A
:Input "X2",B
:Input "Y1",C
:Input "Y2",D
:sqrt(((A-B){^2})+((C-D){^2}))→θ
:Disp "DISTANCE BETWEEN",θ
:Pause
:Goto ST
:Return
:Lbl C
:Disp "DOUBLING TIME"
:Input "CONSTANT",K
:ln(2)/K→T
:Disp "TIME",T
:Pause
:Goto ST
:Lbl D
:Disp "HALF LIFE"
:0→Z
:Menu("FIND?","RATE OF GRO OR DECAY",BB,"TIME TO GRO OR DECAY",BC,"BOTH",BD)
:Lbl BD
:1258.00001→Z
:Lbl BB
:Input "INITIAL AMOUNT",A
:Input "ENDING AMOUNT",B
:Input "TIME",T
:B/A→C
:ln(C)/T→K
:If Z=1258.00001
:Then
:Goto BE
:End
:Disp "RATE",K
:Pause
:Goto ST
:Lbl BC
:Input "STARTING AMOUNT",A
:Input "AMOUNT FINDING",B
:Input "RATE",R
:Goto BG
:Lbl BE
:Input "AMOUNT TO FIND",B
:Lbl BG
:B/A→C
:ln(C)/(R)→T
:If Z=1258.0001
:Goto BF
:Disp "TIME",T
:Pause
:Goto ST
:Lbl BF
:Disp "RATE",K
:Disp "TIME",T
:Pause
:Goto ST
:Lbl E
:Menu("INTEREST","CONTIUNOUS W/{e}",CC,"NON CONTINOUS W/O{e}",CD)
:Lbl CC
:Disp "CONTINUALLY","COMPOUNDED","INTEREST"
:Input "INITIAL",A
:Input "RATE",R
:Input "TIME",T
:A{e}^(RT)→θ
:Disp "AMOUNT",θ
:Pause
:Goto ST
:Lbl CD
:Disp "NON CONTINUALLY","COMPOUNDED","INTEREST"
:Input "INITIAL",A
:Input "RATE",R
:Input "NUMBER OF TIMES",N
:Input "AMOUNT OF TIME",T
:A(1+(R/N))^(NT)→θ
:Disp "AMOUNT",θ
:Pause
:Goto ST
:Lbl H
:Disp "Mid Point Of A Line"
:Input "X1",A
:Input "X2",B
:Input "Y1",C
:Input "Y2",D
:A+B/2→V
:C+D/2→Z
:Disp "Mid Point",V,Z
:Pause
:Goto ST
:Lbl I
:Disp "Quadratic Formula"
:Input "AX{^2}",Z
:Input "BX",B
:Input "C",C
:({-}B+sqrt(B{^2}-4ZC))/(2Z)→X
:({-}B-sqrt(B{^2}-4ZC))/(2Z)→Y
:Disp X
:Disp Y
:Pause
:Goto ST
:Lbl J
:Lbl JL
:Disp "[Sy]nthetic Division"
:Input "AX^6",A
:Input "BX^5",B
:Input "CX^4",C
:Input "DX^3",D
:Input "EX^2",E
:Input "FX",F
:Input "G",G
:Disp "Opposite Of H"
:Input "X+H",H
:A*H→T
:T+B→S
:H*S→R
:R+C→Q
:Q*H→P
:D+P→O
:O*H→N
:E+N→M
:M*H→Z
:F+Z→J
:J*H→X
:G+X→W
:Disp A,S,Q,O,M,J,W
:Pause
:If W=0
:Menu("[Sy]nthetic Division Again","Yes",JL,"No",JM)
:Lbl JM
:If W=0 and Q=0
:Then
:Menu("Quadratic Formula?","Yes",JJ,"No",JK)
:End
:Lbl JK
:Goto ST
:Lbl JJ
:({-}M+sqrt(M{^2}-4OJ))/(2O)→X
:({-}M-sqrt(M{^2}-4OJ))/(2O)→Y
:Disp X
:Disp Y
:Pause
:Goto ST
This one is all volume and area formulas that I made while bored while taking our states standardized test.
Code:
::
:ClrHome
:ClrDraw
:"VOLUME"→Str1
:"SURFACE AREA"→Str4
:a+bi
:Menu("AREA AND VOLUME","ARC LENGTH",A,"CIRCLE",B,"RIGHT CIRCLE CONE",C,"RIGHT CIRC CYLINDER",D,"RECTANGLE PRISM",E,"RIGHT PYRAMID",F,"MORE",MO)
:Lbl MO
:Menu("MORE","SPHERE",G,"TRAPAZOID",H,"TRIANGLE",I,"PYTHAGOREAN THEOREOM",K)
:Lbl I
:Lbl A
:Disp "ARCLENGTH"
:Input "DEGREE OF WEDGE",θ
:Input "RADIUS",R
:(θ/360)*πR→V
:Disp "ARC LENGTH=",V
:Pause
:Return
:Lbl B
:Disp "CIRCLE"
:Input "RADIUS",R
:πR{^2}→Z
:2πR→Q
:Disp "AREA",Z
:Disp "CIRCUMFERENCE",Q
:Pause
:Return
:Lbl C
:Disp "RIGHT CIRCLE CONE"
:Input "RADIUS",R
:Input "HEIGHT",H
:Input "LENGTH",L
:(1/3)πR{^2}→F
:πR{^2}+2πRH→U
:Disp "Str1",F
:Disp "Str4",U
:Pause
:Return
:Lbl D
:Disp "RIGHT CIRCLE CYLINDER"
:Input "RADIUS",R
:Input "HEIGHT",H
:πR{^2}H→V
:2πR{^2}+2πRH→S
:Disp "Str1",V
:Disp "Str4",S
:Pause
:Return
:Lbl E
:Disp "RECTANGULAR PRISM"
:Input "LENGTH",L
:Input "WIDTH",W
:Input "HEIGHT",H
:LHW→V
:2LW+2WH+2HL→S
:Disp "Str1",V
:Disp "Str4",S
:Pause
:Return
:Lbl F
:Disp "RIGHT SIDE PYRAMID"
:Input "SIDE OF BASE",B
:Input "HEIGHT",H
:Input "LENGTH OF SIDE",L
:(1/3)πR{^2}H→V
:S{^2}+2SL→S
:Disp Str1,V
:Disp Str4,S
:Pause
:Return
:Lbl G
:Disp "SPHERE"
:Input "RADIUS",R
:(4/3)πR^3→V
:4πR{^2}→S
:Disp Str1,V
:Disp Str4,S
:Pause
:Return
:Lbl H
:Disp "TRAPAZOID"
:Input "BASE1",A
:Input "BASE2",B
:Input "HEIGHT",H
:(1/2)(B+A)H→S
:Disp Str4,S
:Pause
:Return
:Lbl K
:Menu("RIGHT TRIANGLE","YES",3,"NO",4)
:Lbl 4
:Return
:Disp "PYTHAGOREAN THEOREOM"
:Lbl 3
:Disp " ."," .. C"," . ."," . .","A. ."," ......"," B "
:Pause
:Disp "ENTER ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A",A
:Input "SIDE B",B
:Input "SIDE C",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:ClrHome
:Disp "SIDE A",Z
:Pause
:Return
:End
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Y
:ClrHome
:Disp "SIDE B",Y
:Pause
:Else
:Goto DE
:End
:Return
:Lbl DE
:If C=0
:Then
:sqrt((A{^2}+B{^2}))→X
:ClrHome
:Disp "SIDE C",X
:Pause
:End
:Return
:Lbl 1
:Menu("DO YOU HAVE","ALL SIDES",AB,"LENGTH HEIGHT",BC,"NEITHER",NE)
:Lbl NE
:Disp "PYTHAGOREAN THEOREOM"
:Lbl 3
:Disp " ."," .. C"," . ."," . .","A. ."," ......"," B "
:Pause
:Disp "ENTER ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A",A
:Input "SIDE B",B
:Input "SIDE C",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:ClrHome
:Disp "SIDE A",Z
:Pause
:End
:Goto AB
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Y
:ClrHome
:Disp "SIDE B",Y
:Pause
:Else
:Goto DE
:End
:Goto AB
:Lbl DE
:If C=0
:Then
:sqrt((A{^2}+B{^2}))→X
:ClrHome
:Disp "SIDE C",X
:Pause
:Goto AB
:Lbl AB
:Input "Side A",A
:Input "Side B",B
:Input "Side C",C
:(1/2)(A+B+C)→S
:sqrt(S(S+A)(S+B)(S+C))→K
:Disp Str4,K
:Lbl BC
:Input "Length",L
:Input "Height",H
:(1/2)(LH)→U
:Disp "Area",U
And then the far from final version of my program for the first year of calculus.
Code:
:Normal
:Float
:a+bi
:AxesOn
:MATHPRINT
:Lbl ST
:Menu("CALCULUS","REIMUNS SUM",A,"TRIGONOMETRY",Z,"EXIT",XX)
:Lbl XX
:Return
:
:
:
:
:
:Lbl A
:Menu("USE","SQUARE",AA,"TRIANGLE",AB,"CIRCLES",AC,"BACK",ST,"EXIT",XX)
1
:Lbl AA
:ans→Z
:Goto Y
:Lbl AB
:sqrt(3)*4→Z
:Goto Y
:Lbl AC
:π/8→Z
:Goto Y
:Lbl Y
:Input "HEIGHT FORMULA",Str1
:String►Equ(Str1,{Y1}
:Input "LOWER BOUND FORMULA",Str2
:String►Equ(Str2,{Y2})
:Input "THICKNESS OF SHAPE",B
:Input "LEFT BOUND",P
:Input "RIGHT BOUND",Q
:abs(Q-P)→L
:Input "NUMBER OF PARTITION",N
:L/N→V
:0→X
:0→T
:0→C
:Lbl θ
:Repeat C=L
:X+V→X
:Z*({Y1}-{Y2}){^2}*B→U
:U+T→T
:C+V→C
:End
:Disp "RIGHT EDGE SUM",T
:Pause
:0→X
:0→C
:0→S
:Repeat C=(L-1)
:X+V→X
:Z*({Y1}-{Y2}){^2}*B→U
:U+S→S
:C+V→C
:End
:Disp "LEFT EDGE SUM",S
:Pause
:(T+S)/2→K
:Disp "TOTAL VOLUME",K
:Pause
:Goto ST
:
:
:
:
:Lbl Z
:Asm(prgmZZARCHIV
:UnarchiveprgmTRIGONOM
:prgmTRIGONOM
:ArchiveprgmTRIGONOM
:Asm(prgmZZARCHIV
One random bit of trivia to start: every ":Disp Str0 \ :Pause " can just be "Pause Str0". Other things: why not use Doors CS functions for archiving/unarchiving? Assorted optimization:
Code:
becomes:
Code:
Also
Code:
to
Code:
Lots more to look for soon!
Code:
:If θ≥2
:Input "WHERE2",P
:If θ≥3
:Input "WHERE3",Q
:If θ≥4
:Input "WHERE4",R
:If θ≥5
:Input "WHERE5",S
:If θ=6
:Input "WHERE6",T
:Disp O,P,Q,R,S,T
Code:
For(T,2,6
;If θ≥T:Then
:"WHERE"+sub("123456",T,1
:Input Ans,U
://store U to something useful
Also
Code:
:If L=10
:Disp "DEC"
:If L=9
:Disp "NON"
:If L=8
:Disp "OCT"
:If L=7
:Disp "HEPT"
:If L=6
:Disp "HEX"
:If L=5
:Disp "PENT"
:If L=4
:Disp "BUT"
:If L=3
:Disp "PROP"
:If L=2
:Disp "ETH"
:If L=1
:Disp "METH"
:Pause
Code:
sub("METHETH-PROPBUT-PENTHEX-HEPTOCT-NON-DEC-",4L-3,4
:If "-"=sub(Ans,4,1
:sub(Ans,1,3
:Disp Ans
Lots more to look for soon!
I dont know how to use doors CS to unarchive and archive. I mainly use it so when I am editing code I can break it where I need it and it goes right to that line instead of scrolling for that line forever. and thanks for the Redo. I will plug it in and make sure everything works well.
Aes_Sedia5 wrote:
I dont know how to use doors CS to unarchive and archive. I mainly use it so when I am editing code I can break it where I need it and it goes right to that line instead of scrolling for that line forever. and thanks for the Redo. I will plug it in and make sure everything works well.
Here's the documentation on all the BASIC functions Doors CS offers:
http://dcs.cemetech.net/index.php?title=Third-Party_BASIC_Libraries
http://dcs.cemetech.net/index.php?title=DCSB_Libs
And specifically about archiving/unarchiving:
http://dcs.cemetech.net/index.php?title=BasicLibs:ToggleSet
- Aes_Sedia5
- Minor Calculator Deity (Posts: 1010)
- 05 Sep 2011 01:50:17 pm
- Last edited by Aes_Sedia5 on 05 Sep 2011 02:24:22 pm; edited 3 times in total
Ok Updated code
This is the revised first program.
Code:
This Is The Revision of the calculus program
Code:
This is the revision of my Trigonmetry Program
Code:
This is the revised first program.
Code:
::"Name Organic Molecules"
:ClrHome
:Lbl ST
:Menu("TYPE","ALKANE",A,"OTHER",B,"EXIT",XX)
:Lbl XX
:Return
:Lbl B
:"PRESS ENTER TO CONTINUE"→Str0
:ClrDraw
:ClrHome
:Lbl 1
:Menu("DOUB BOND O","YES",A,"NO",B,"BACK",XX)
:Lbl XX
:Return
:Lbl A
:Menu("SINGL BOND O","YES",C,"NO",D,"BACK",1,"EXIT",XX)
:Lbl D
:Menu("NITROGEN","YES",E,"NO",F,"BACK",A)
:Lbl E
:Disp "AMIDE"
:Disp "ETHANEAMIDE"
:Pause Str0
:Return
:Lbl F
:Menu("WHERE IS DOUBLE BOND O?","END",BC,"MIDDLE",AB,"BACK",D)
:Lbl Z
:Disp "CARBOXYLIC ACID"
:Disp "ETHANOIC ACID"
:Pause Str0
:Return
:Lbl Y
:Disp "ESTER"
:Disp "ETHYLBUTANOATE"
:Pause Str0
:Return
:Lbl C
:Menu("WHERE IS SINGLE BOND O?","AT END",Z,"IN MIDDLE",Y,"BACK",A)
:Lbl BC
:Disp "ALDEHYDE"
:Disp "ETHANAL"
:Pause Str0
:Return
:Lbl AB
:Disp "KETONE"
:Disp "3,PENTANONE"
:Pause Str0
:Return
:Lbl B
:Menu("BOND","HALOGEN",W,"SINGLE BOND O",V,"NITROGEN",U,"BACK",A)
:Lbl W
:Disp "HALOALKANE"
:Disp "DICHOLORODIFLUOROMETHANE"
:Pause Str0
:Return
:Lbl U
:Disp "AMINE"
:Disp "TRIMETHYLAMINE"
:Disp "ETHYLMETHYLAMINE"
:Pause Str0
:Return
:Lbl V
:Menu("WHERE SINGLE BOND O","AT END",N,"IN MIDDLE",O,"BACK",B)
:Lbl N
:Disp "ALCOHOL"
:Disp "PROPANOL"
:Pause Str0
:Return
:Lbl O
:Disp "ETHER"
:Disp "DIETHYLETHER"
:Pause Str0
:Return
:Goto ST
:Lbl A
:Disp "HIGHEST 10"
:Input "LENGTH OF PARENT",L
:Input "HIGHEST BOND",Z
:If Z>1
:Then
:Disp "MAX 6"
:Input "NUMBER OF THAT BOND",θ
:End
:Disp "MAX 6"
:Input "NUMBER OF BRANCHES",B
:Disp "PUT IN ALPHA ORDER"
:If B=6
:Input "WHERE BRANCH 1",A
:If B=6
:Input "LENGTH OF B 1",C
:If B≥5
:Input "WHERE 2",D
:If B≥5
:Input "LENGTH 2",E
:If B≥4
:Input "WHERE3",F
:If B≥4
:Input "LENGTH3",G
:If B≥3
:Input "WHERE4",H
:If B≥3
:Input "LENGTH4",I
:If B≥2
:Input "W5",J
:If B≥2
:Input "L5",K
:If B≥1
:Input "W6",M
:If B≥1
:Input "L6",N
:If C=4
:Disp A,"BUTYL"
:If C=3
:Disp A,"PROPYL"
:If C=2
:Disp A,"ETHYL"
:If C=1
:Disp A,"METHYL"
:Pause
:If E=4
:Disp D,"BUTYL"
:If E=3
:Disp D,"PROPYL"
:Pause
:If E=2
:Disp D,"ETHYL"
:If E=1
:Disp D,"METHYL"
:Pause
:If G=4
:Disp F,"BUTYL"
:If G=3
:Disp F,"PROPYL"
:If G=2
:Disp F,"ETHYL"
:If G=1
:Disp F,"METHYL"
:Pause
:If I=4
:Disp H,"BUTYL"
:If I=3
:Disp H,"PROPYL"
:If I=2
:Disp H,"ETHYL"
:If I=1
:Disp H,"METHYL"
:Pause
:If K=4
:Disp J,"BUTYL"
:If K=3
:Disp J,"PROPYL"
:If K=2
:Disp J,"ETHYL"
:If K=1
:Disp J,"METHYL"
:Pause
:If N=4
:Disp M,"BUTYL"
:If N=3
:Disp M,"PROPYL"
:If N=2
:Disp M,"ETHYL"
:If N=1
:Disp M,"METHYL"
:Pause
:0→O
:0→P
:0→Q
:0→R
:0→S
:0→T
:If Z>1 and θ≥1
:Input "WHERE BOND 1",O
:If θ≥2
:For(T,2,6
:If θ≥T:Then
:"WHERE"+sub("123456",T,1
:Input Ans,U
:sub("METHETH-PROPBUT-PENTHEX-HEPTOCT-NON-DEC-",4L-3,4
:If "-"=sub(Ans,4,1
:sub(Ans,1,3
:Pause Ans
:If Z=3
:Pause "YNE"
:If Z=2
:Pause "ENE"
:If Z=1
:Pause "ANE"
:Return
:Goto ST
This Is The Revision of the calculus program
Code:
:Normal
:Float
:a+bi
:AxesOn
:MATHPRINT
:Lbl ST
:Menu("CALCULUS","REIMUNS SUM",A,"TRIGONOMETRY",Z,"EXIT",XX)
:Lbl XX
:Return
:
:
:Lbl A
:Menu("USE","SQUARE",AA,"TRIANGLE",AB,"CIRCLES",AC,"BACK",ST,"EXIT",XX)
:Lbl AA
:1→Z
:Goto Y
:Lbl AB
:sqrt(3)*4→Z
:Goto Y
:Lbl AC
:π/8→Z
:Goto Y
:Lbl Y
:Input "HEIGHT FORMULA",Str1
:String►Equ(Str1,{Y1}
:Input "LOWER BOUND FORMULA",Str2
:String►Equ(Str2,{Y2})
:Input "THICKNESS OF SHAPE",B
:Input "LEFT BOUND",P
:Input "RIGHT BOUND",Q
:abs(Q-P)→L
:Input "NUMBER OF PARTITION",N
:L/N→V
:0→X
:0→T
:0→C
:Lbl θ
:Repeat C=L
:X+V→X
:Z*({Y1}-{Y2}){^2}*B→U
:U+T→T
:C+V→C
:End
:Disp "RIGHT EDGE SUM",T
:Pause
:0→X
:0→C
:0→S
:Repeat C=(L-1)
:X+V→X
:Z*({Y1}-{Y2}){^2}*B→U
:U+S→S
:C+V→C
:End
:Pause "LEFT EDGE SUM",S
:(T+S)/2→K
:Pause "TOTAL VOLUME",K
:Goto ST
:
:
:
:
:Lbl Z
:det(0,"prgmTRIGONOM"0,)
:prgmTRIGONOM
:det(0,"prgmTRIGONOM"0,)
://Did I Do this part right to archive and unarchive?
This is the revision of my Trigonmetry Program
Code:
::"Everything for Trig Class"
:Lbl ST
:ClrHome
:ClrDraw
:ClrTable:Menu("TRIGONOMETRY","LOGS",A,"RADIANS AND DEGREES",B,"SIN AND COS",C,"PYTHAGOREAN THEREOM",D,"EXIT",XX)
:Lbl XX
:Return
:Lbl A
:Menu("LOGS","BASE CHANGE",AA,"REWRITE",AB)
:Lbl AA
:Input "ARGUMENT",A
:Input "BASE",B
:log(A)/log(B)→θ
:Pause θ
:Goto ST
:Lbl AB
:Menu("LOG REWRITE","FROM LOG",AC,"TO LOG",AD,"BACK",ST)
:Lbl AC
:Input "LOG ARGUMENT",A
:Input "LOG BASE",B
:Input "LOG COEFFICIENT",C
:Input "=?",D
:Pause B,"^",D,"=",C,"^",A
:Goto ST
:Lbl AD
:Input "BASE OF EXPONENT",B
:Input "EXPONENT",D
:Input "=Base Of Exponent",C
:Input "=Exponent",A
:Pause A,"log Base",B,"log Argument",C,"=",D
:Goto ST
:Lbl B
:Menu("DEGREE AND RADIANS","DEGREE TO RADIANS",BA,"RADIANS TO DEGREE",BB,"FIND POINTS",BC,"BACK",ST)
:Lbl BA
:Degree
:Disp "DO NOT PUT º"
:Input "DEGREE",θ
:θ(π/180)→Z
:Pause "RADIAN",Z
:Goto ST
:Lbl BB
:Radian
:Disp "DO NOT PUT π"
:Input "RADIANS",θ
:θπ*(180/π)→Z
:Pause Z,"º"
:Goto ST
:Lbl BC
:Input "RADIAN OR DEGREE",θ
:If θ=0 or θ=2π or θ=360
:Then
:Pause "(1,0)"
:End
:Goto ST
:If θ=30 or θ=π/6
:Then
:Pause "(sqrt(3)/2,(1/2)"
:End
:Goto ST
:If θ=45 or θ=π/4
:Then
:Pause "(sqrt(2)/2,sqrt(2)/2)"
:Goto ST
:Else
:If θ=60 or θ=π/3
:Then
:Pause "(1/2,sqrt(3)/2)"
:Goto ST
:Else
:If θ=90 or θ=π/2
:Then
:Pause "(1,0)"
:Goto ST
:Else
:If θ=120 or θ=2π/3
:Then
:Pause "(-1/2,sqrt(3)/2)"
:Goto ST
:Else
:If θ=135 or θ=(3π/4)
:Then
:Pause "(sqrt(2)/2,sqrt(2)/2)"
:Goto ST
:Else
:If θ=150 or θ=(5π/6)
:Then
:Pause "(sqrt(3)/2,1/2)"
:Goto ST
:Else
:If θ=180 or θ=(π)
:Then
:Pause "(-1,0)"
:Goto ST
:Else
:If θ=210 or θ=(7π/6)
:Then
:Pause "(-sqrt(3)/2,-1/2)"
:Goto ST
:Else
:If θ=225 or θ=(5π/4)
:Then
:Pause "(-sqrt(2)/2,-sqrt(2)/2)"
:Goto ST
:Else
:If θ=240 or θ=(4π/3)
:Then
:Pause "(-1/2,-sqrt(3)/2)"
:Goto ST
:Else
:If θ=270 or θ=(3π/2)
:Then
:Pause "(0,-1)"
:Goto ST
:Else
:If θ=300 or θ=(5π/3)
:Then
:Pause "(1/2,-sqrt(3)/2)"
:Goto ST
:Else
:If θ=315 or θ=(7π/4)
:Then
:Pause "(sqrt(2)/2,-sqrt(2)/2)"
:Goto ST
:Lbl C
:Menu("SIN AND COS","LAW OF SINES",CA,"ADDITION FORMULA",CC,"HALF ANGLE S/2",CD,"DOUBLE ANGLESIN(2S)",CE,"PERIOD OF CURVE",CF,"BACK",ST)
:Lbl CA
:Degree
:Disp "INPUT ZERO","FOR PIECES","NOT KNOWN"
:Input "SIDE A=",A
:Input "ANGLE A=",Z
:Input "SIDE B=",B
:Input "ANGLE B=",Y
:Input "SIDE C=",C
:Input "ANGLE C=",X
:If A=0 and X=0 and C=0
:Then
:Bsin(Z)/sin(Y)→A
:180-(Z+Y)→θ
:Bsin(θ)/sin(Y)→X
:Disp "SIDE A=",A
:Disp "SIDE C=",X
:Pause "ANGLE C=",θ
:Goto ST
:Else
:If C=0 and X=0 and B=0
:Asin(Y)/sin(Z)→B
:180-(Y+Z)→X
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Pause "SIDE B=",B
:Goto ST
:Else
:If Z=0 and X=0 and C=0
:Then
:sin{^-1}(Bsin(Z)/A)→Z
:180-(Z+Y)→X
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Pause "ANGLE A=",Z
:Goto ST
:Else
:If A=0 and B=0 and Z=0
:Then
:Csin(Y)/sin(X)→B
:180-(Y+X)→Z
:Asin(X)/sin(Z)→C
:Disp "SIDE C=",C
:Disp "ANGLE A=",Z
:Pause "SIDE B=",B
:Goto ST
:Else
:If A=0 and Z=0 and Y=0
:Then
:sin{^-1}(Bsin(X)/C)→Y
:180-(X+Y)→Z
:Bsin(Z)/sin(Y)→A
:Disp "SIDE A=",A
:Disp "ANGLE A=",Z
:Pause "ANGLE B="Y
:Goto ST
:If A=0 and B=0 and Y=0
:A*sin(X)/sin(Z)→A
:180-(Z+X)→Y
:Asin(Y)/sin(Z)→B
:Disp "SIDE B=",B
:Disp "ANGLE B=",Y
:Pause "SIDE A=",A
:Goto ST
:Else
:If Z=0 and B=0 and Y=0
:Then
:sin{^-1}(Asin(X)/C)→Z
:180-(Z+X)→Y
:Csin(Z)/sin(X)→A
:Disp "SIDE A=",A
:Disp "ANGLE B=",Y
:Pause "ANGLE A=",Z
:Goto ST
:If Z=0 and C=0 and X=0
:Then
:sin{^-1}(Asin(Y)/B→Z
:180-(Y+Z)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE B=",Y
:Pause "ANGLE A=",Z
:Goto ST
:Else
:If A=0 and C=0 and X=0
:Then
:sin{^-1}(Bsin(Z)/sin(Y))→A
:180-(Z+Y)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Pause "SIDE A=",A
:Goto ST
:Else
:If B=0 and X=0 and C=0
:Then
:(Asin(Y)/sin(Z))→B
:180-(Y+Z)→X
:Bsin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Pause "SIDE B=",B
:Goto ST
:Else
:If Y=0 and C=0 and X=0
:Bsin(Z)/A→Y
:180-(Z+Y)→X
:Asin(X)/sin(Y)→C
:Disp "SIDE C=",C
:Disp "ANGLE C=",X
:Pause "ANGLE B=",Y
:Goto ST
:Else
:If A=0 and Y=0 and X=0
:Then
:B{^2}+C{^2}-2BCcos(X)→A
:sin{^-1}(Asin(X)/C)→Z
:180-(Z+X)→Y
:Disp "ANGLE B=",Y
:Disp "ANGLE A=",Z
:Pause "SIDE A=",a
:Goto ST
:Else
:If B=0 and Y=0 and X=0
:Then
:A{^2}+C{^2}-2ACcos(Y)→B
:sin{^-1}(Asin(Y)/B)→Z
:180-(Y+Z)→X
:Disp "ANGLE C=",X
:Disp "ANGLE A=",Z
:Pause "SIDE B=",B
:Goto ST
:Else
:If C=0 and Z=0 and Y=0
:Then
:A{^2}+B{^2}-2ABcos(Z)→C
:sin{^-1}(Csin(Z)/A)→X
:180-(Z+X)→Y
:Disp "ANGLE B=",Y
:Disp "ANGLE C=",X
:Pause "SIDE C=",C
:Goto ST
:End
:Lbl D
:Pause " ."," .. C"," .b. "," . .","A. ."," .a b."," ......."," B "
:Disp "INPUT ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A=",A
:Input "SIDE B=",B
:Input "SIDE C=",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:Pause Z
:Goto ST
:Else
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Z
:Pause Z
:Goto ST
:Else
:If C=0
:sqrt(A{^2}+B{^2})→Z
:Pause Z
:Goto ST
:End
:Lbl CC
:Menu("ADDITION FORMULAS","SIN",1C,"COS",2C,"BACK",C)
:Lbl 1C
:Disp "SIN(S+T)=","SIN(S)COS(T)+","COS(T)SIN(S)"
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:Input "SIN OF T",T
:Input "COSINE OF T",Y
:sin(S)cos(Y)+cos(T)sin(Z)→θ
:Pause θ
:Goto ST
:Lbl 2C
:Disp "cos(S+T)=","cos(S)cos(T)-","sin(S)sin(T)"
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:Input "SIN OF T",T
:Input "COSINE OF T",Y
:cos(Z)cos(Y)-sin(S)sin(T)→θ
:Pause θ
:Goto ST
:Lbl CD
:Menu("HALF ANGLE FORMULAS","SIN",3C,"COS",4C,"BACK",C)
:Lbl 3C
:Disp "sin(S/2)"
:Input "COSINE OF S",S
:sqrt((1-cos(S)/2)→X
:{-}sqrt((1-cos(S)/2)→Y
:Pause X,Y
:Goto ST
:Lbl 4C
:Disp "cos(S/2)"
:Input "S",S
:sqrt((1+cos(S)/2)→X
:{-}sqrt((1+cos(S)/2)→Y
:Pause X,Y
:Goto ST
:Lbl CE
:Menu("DOUBLE ANGLE FORMULAS","SIN",5C,"COS",6C,"BACK",C)
:Lbl 5C
:Disp "sin(2S)
:Input "SIN OF S",S
:Input "COSINE OF S",Z
:2sin(S)cos(Z)→θ
:Pause θ
:Goto ST
:Lbl 6C
:Disp "cos(2S)"
:Input "SINE OF S",S
:Input "COSINE OF S",Z
:cos(Z){^2}-sin(S){^2}→θ
:Pause θ
:Goto ST
:Lbl CF
:Menu("SIN OR TAN","≥","SIN AND COS",FA,"TANGENT",FB,"BACK",ST
:Lbl CG
:Disp "COS(KX)","SIN(KX)
:Disp "INPUT π IF NEEDED"
:Prompt K
:2π/K→θ
:Pause "PERIOD=",θ
:Goto CF
:Lbl CH
:Disp "TAN(KX)"
:Disp "INPUT π IF NEEDED"
:Prompt K
:π/K→θ
:Pause "PERIOD=",θ
:Goto CF
To archive/unarchive a file, do det(0,"FILENAME",0). That would be:
Code:
Code:
det(0,"TRIGONOM",0)
prgmTRIGONOM
det(0,"TRIGONOM",0)
Thanks very much. Good to know. Where can you find det( on the calculator. I do most of my programming on the calculator and its a pain to go through the catalog.
This is the upgrade on my algebra program
Code:
This is the revision of my volume and area program
Code:
This is the upgrade on my algebra program
Code:
::"Basic Algebra"
:Lbl ST
:ClrHome
:ClrTable
:ClrDraw
:a+bi
:Menu("FORMULAS","EXPONENTIAL GROWTH",A,"DISTANCE BETWEEN POINTS",B,"DOUBLING TIME",C,"HALF LIFE",D,"INTEREST",E,"MORE",G,"EXIT",XX)
:Lbl XX
:Return
:Lbl G
:Menu("MORE FORMULAS","LOGS",F,"MID POINT OF A LINE",H,"QUADRATIC FORMULA",I,"SYNTHETIC DIVISION",J,"TRIGONOMETRY",K,"BACK",ST,"EXIT",XX)
:Lbl A
:Menu("EXPONENTIAL GROWTH","CONTINOUS W/{e}",AA,"NON CONTINOUS W/O{e}",AB)
:Lbl AA
:Input "INITIAL AMOUNT",N
:Input "INTEREST RATE",R
:Input "TIME",T
:N{e}^(RT)→θ
:Pause "AMOUNT=",θ
:Goto ST
:Lbl AB
:Input "INITIAL AMOUNT",N
:Input "INTEREST RATE",R
:Input "TIME",T
:N(1+R)^T→θ
:Pause "AMOUNT",θ
:Goto ST
:Lbl B
:Disp "DISTANCE","BETWEEN","TWO POINTS"
:Input "X1",A
:Input "X2",B
:Input "Y1",C
:Input "Y2",D
:sqrt(((A-B){^2})+((C-D){^2}))→θ
:Pause "DISTANCE BETWEEN",θ
:Goto ST
:Return
:Lbl C
:Disp "DOUBLING TIME"
:Input "CONSTANT",K
:ln(2)/K→T
:Disp "TIME",T
:Pause
:Goto ST
:Lbl D
:Disp "HALF LIFE"
:0→Z
:Menu("FIND?","RATE OF GRO OR DECAY",BB,"TIME TO GRO OR DECAY",BC,"BOTH",BD)
:Lbl BD
:1258.00001→Z
:Lbl BB
:Input "INITIAL AMOUNT",A
:Input "ENDING AMOUNT",B
:Input "TIME",T
:B/A→C
:ln(C)/T→K
:If Z=1258.00001
:Goto BE
:Pause "RATE",K
:Goto ST
:Lbl BC
:Input "STARTING AMOUNT",A
:Input "AMOUNT FINDING",B
:Input "RATE",R
:Goto BG
:Lbl BE
:Input "AMOUNT TO FIND",B
:Lbl BG
:B/A→C
:ln(C)/(R)→T
:If Z=1258.0001
:Goto BF
:Pause "TIME",T
:Goto ST
:Lbl BF
:Disp "RATE",K
:Pause "TIME",T
:Goto ST
:Lbl E
:Menu("INTEREST","CONTIUNOUS W/{e}",CC,"NON CONTINOUS W/O{e}",CD)
:Lbl CC
:Disp "CONTINUALLY","COMPOUNDED","INTEREST"
:Input "INITIAL",A
:Input "RATE",R
:Input "TIME",T
:A{e}^(RT)→θ
:Pause "AMOUNT",θ
:Goto ST
:Lbl CD
:Disp "NON CONTINUALLY","COMPOUNDED","INTEREST"
:Input "INITIAL",A
:Input "RATE",R
:Input "NUMBER OF TIMES",N
:Input "AMOUNT OF TIME",T
:A(1+(R/N))^(NT)→θ
:Pause "AMOUNT",θ
:Goto ST
:Lbl H
:Disp "Mid Point Of A Line"
:Input "X1",A
:Input "X2",B
:Input "Y1",C
:Input "Y2",D
:A+B/2→V
:C+D/2→Z
:Pause "Mid Point",V,Z
:Goto ST
:Lbl I
:Disp "Quadratic Formula"
:Input "AX{^2}",Z
:Input "BX",B
:Input "C",C
:({-}B+sqrt(B{^2}-4ZC))/(2Z)→X
:({-}B-sqrt(B{^2}-4ZC))/(2Z)→Y
:Pause X,Y
:Goto ST
:Lbl J
:Lbl JL
:Disp "[Sy]nthetic Division"
:Input "AX^6",A
:Input "BX^5",B
:Input "CX^4",C
:Input "DX^3",D
:Input "EX^2",E
:Input "FX",F
:Input "G",G
:Disp "Opposite Of H"
:Input "X+H",H
:A*H→T
:T+B→S
:H*S→R
:R+C→Q
:Q*H→P
:D+P→O
:O*H→N
:E+N→M
:M*H→Z
:F+Z→J
:J*H→X
:G+X→W
:Pause A,S,Q,O,M,J,W
:If W=0
:Menu("[Sy]nthetic Division Again","Yes",JL,"No",JM)
:Lbl JM
:If W=0 and Q=0
:Menu("Quadratic Formula?","Yes",JJ,"No",JK)
:Lbl JK
:Goto ST
:Lbl JJ
:({-}M+sqrt(M{^2}-4OJ))/(2O)→X
:({-}M-sqrt(M{^2}-4OJ))/(2O)→Y
:Pause X, Y
:Goto ST
This is the revision of my volume and area program
Code:
::"All Volumes and Areas"
:ClrHome
:ClrDraw
:"VOLUME"→Str1
:"SURFACE AREA"→Str4
:a+bi
:Menu("AREA AND VOLUME","ARC LENGTH",A,"CIRCLE",B,"RIGHT CIRCLE CONE",C,"RIGHT CIRC CYLINDER",D,"RECTANGLE PRISM",E,"RIGHT PYRAMID",F,"MORE",MO)
:Lbl MO
:Menu("MORE","SPHERE",G,"TRAPAZOID",H,"TRIANGLE",I,"PYTHAGOREAN THEOREOM",K)
:Lbl I
:Lbl A
:Disp "ARCLENGTH"
:Input "DEGREE OF WEDGE",θ
:Input "RADIUS",R
:(θ/360)*πR→V
:Pause "ARC LENGTH=",V
:Return
:Lbl B
:Disp "CIRCLE"
:Input "RADIUS",R
:πR{^2}→Z
:2πR→Q
:Disp "AREA",Z
:Pause "CIRCUMFERENCE",Q
:Return
:Lbl C
:Disp "RIGHT CIRCLE CONE"
:Input "RADIUS",R
:Input "HEIGHT",H
:Input "LENGTH",L
:(1/3)πR{^2}→F
:πR{^2}+2πRH→U
:Disp Str1,F
:Pause Str4,U
:Return
:Lbl D
:Disp "RIGHT CIRCLE CYLINDER"
:Input "RADIUS",R
:Input "HEIGHT",H
:πR{^2}H→V
:2πR{^2}+2πRH→S
:Disp Str1,V
:Pause Str4,S
:Return
:Lbl E
:Disp "RECTANGULAR PRISM"
:Input "LENGTH",L
:Input "WIDTH",W
:Input "HEIGHT",H
:LHW→V
:2LW+2WH+2HL→S
:Disp Str1,V
:Pause Str4,S
:Return
:Lbl F
:Disp "RIGHT SIDE PYRAMID"
:Input "SIDE OF BASE",B
:Input "HEIGHT",H
:Input "LENGTH OF SIDE",L
:(1/3)πR{^2}H→V
:S{^2}+2SL→S
:Disp Str1,V
:Pause Str4,S
:Return
:Lbl G
:Disp "SPHERE"
:Input "RADIUS",R
:(4/3)πR^3→V
:4πR{^2}→S
:Disp Str1,V
:Pause Str4,S
:Return
:Lbl H
:Disp "TRAPAZOID"
:Input "BASE1",A
:Input "BASE2",B
:Input "HEIGHT",H
:(1/2)(B+A)H→S
:Pause Str4,S
:Return
:Lbl K
:Menu("RIGHT TRIANGLE","YES",3,"NO",4)
:Lbl 4
:Return
:Disp "PYTHAGOREAN THEOREOM"
:Lbl 3
:Disp " ."," .. C"," . ."," . .","A. ."," ......"," B "
:Pause
:Disp "ENTER ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A",A
:Input "SIDE B",B
:Input "SIDE C",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:ClrHome
:Pause "SIDE A",Z
:Return
:End
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Y
:ClrHome
:Pause "SIDE B",Y
:Else
:Goto DE
:End
:Return
:Lbl DE
:If C=0
:Then
:sqrt((A{^2}+B{^2}))→X
:ClrHome
:Pause "SIDE C",X
:End
:Return
:Lbl 1
:Menu("DO YOU HAVE","ALL SIDES",AB,"LENGTH HEIGHT",BC,"NEITHER",NE)
:Lbl NE
:Disp "PYTHAGOREAN THEOREOM"
:Lbl 3
:Disp " ."," .. C"," . ."," . .","A. ."," ......"," B "
:Pause
:Disp "ENTER ZERO","FOR THE SIDE","YOUR FINDING"
:Input "SIDE A",A
:Input "SIDE B",B
:Input "SIDE C",C
:If A=0
:Then
:sqrt((C{^2}-B{^2}))→Z
:ClrHome
:Pause "SIDE A",Z
:End
:Goto AB
:If B=0
:Then
:sqrt((C{^2}-A{^2}))→Y
:ClrHome
:Pause "SIDE B",Y
:Else
:Goto DE
:End
:Goto AB
:Lbl DE
:If C=0
:Then
:sqrt((A{^2}+B{^2}))→X
:ClrHome
:Pause "SIDE C",X
:Goto AB
:Lbl AB
:Input "Side A",A
:Input "Side B",B
:Input "Side C",C
:(1/2)(A+B+C)→S
:sqrt(S(S+A)(S+B)(S+C))→K
:Pause Str4,K
:Lbl BC
:Input "Length",L
:Input "Height",H
:(1/2)(LH)→U
:Pause "Area",U
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
» Go to Registration page
» Goto page Previous 1, 2, 3, ... 10, 11, 12 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 12
» 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
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