Output(1,1,"*****************//////////////**//////////////**Math Formulas/**//////////////**/By:Rod Serna/**//////////////*****************
Pause
Lbl 1
ClrDraw:DispGraph:FnOff :ú47üXmin:47üXmax:ú31üYmin:31üYmax:AxesOff
Line(ú46,31,ú46,ú31
Line(ú46,30,46,30
Horizontal 31
Horizontal ú31
Vertical 47
Vertical ú47
Text(10,21,"Which Program?
Text(20,5,"1:Circum.
Text(26,5,"2:Sys. of Equ.
Text(32,5,"3:Quadratic
Text(38,5,"4:Midpoint
Text(44,5,"5:Tri. Fact.
Text(50,5,"6:Exit

0üG
While G=0
getKeyüG:End

If G=92:Then
Goto 2:End
If G=93:Then
Goto 3:End
If G=94:Then
Goto 4:End
If G=82:Then
Goto 5:End
If G=83:Then
Goto 6:End
If G=84:Then
ClrDraw
ClrHome:Stop
End

Goto 1


Lbl 2
ClrHome
Disp "2rÄ=Circum."
0üG
Input "r=",C
ClrDraw
(C2)üC
DispGraph
Text(10,14,"Circmference="
Text(10,65,C,"Ä
Text(20,11,"Would you like the ful
Text(26,33,"answer?
Text(36,10,"1:Yes"
Text(36,68,"2:Quit"
While G=0
getKeyüG
End
If G=93:Then
ClrHome:ClrDraw
Stop:End
If G=92:Then
(CÄ)üC
Text(46,16,"Circum.=",C
0üG
While G=0
getKeyüG
End
If G=45:Then
Goto 1
End
If G=93:Then
ClrHome
ClrDraw:Stop
End


Lbl 3
ClrHome
Disp "a1+b1=c1
Input "a1=",A
Input "b1=",B
Input "c1=",C
ClrHome
Disp "a2+b2=c2
Input "a2=",D
Input "b2=",E
Input "c2=",F
(B/A)üB
(C/A)üC
E+B*(úD)üE
F+C*(úD)üF
(F/E)üY
(C-B*Y)üX
ClrDraw
DispGraph
Text(10,18,"The solution is...
Text(24,27,"(",X,",",Y,")"
Text(50,15,"Press ENTER to quit
Text(56,12,"or MODE to go to Menu


0üG
While G=0
getKeyüG
End
If G=105:Then
ClrHome
Stop:End
If G=22:Then
Goto 1:End



Lbl 4
ClrHome
Disp " úb(+-)ð(bÜ-4ac)
Disp "x=--------------
Disp " 2a
Input "a=",A
Input "b=",B
Input "c=",C
ð((BÜ)-4AC)üZ
ZüY
(ú(B)+Z)üZ
(ú(B)-Y)üY
Z/(2A)üD
Y/(2A)üE
ClrDraw
Text(20,1,"The answers are...
Text(28,60,D
Text(34,61,"and
Text(40,60,E
Text(46,20,"Hit ENTER to exit
Text(55,10,"or MODE to go to menu
0üG
While G=0
getKeyüG
End
If G=105:Then
ClrHome:ClrDraw
Stop:End
If G=22:Then
Goto 1:End
Goto 1

Lbl 5
ClrHome
Disp " x1+x2 y1+y2
Disp " M=-----,-----
Disp " 2 2
Input "x1=",X
Input "y1=",A
Input "x2=",W
Input "y2=",B
(X+W)üX
(A+B)üA
(X/2)üX
(A/2)üA
ClrDraw
DispGraph
Text(10,29,"Midpoint is...
Text(20,34,"(",X,",",A,")"
Text(28,23,"Hit ENTER to exit
Text(40,13,"or MODE to go to menu
0üG
While G=0
getKeyüG
End
If G=105:Then
ClrHome
ClrDraw
Stop:End
If G=22:Then
Goto 1:End

Lbl 6
ClrHome
Disp "AXÜ BX C
Prompt A,B,C
gcd(abs(A),abs(B)üÁ
gcd(abs(B),abs(C)üZ
gcd(abs(A),abs(C)üY
gcd(Á,Z)üZ
gcd(Z,Y)üZ
A/ZüA:B/ZüB
C/ZüC:1üW
If Z>9:2üW
If Z>99:3üW
If Z=1:0üW
BÜ-4ACüD
0üI
If D<0:1üI
abs(D)üD
If fPart(ð(D))ø0:Goto Z1
úB+ð(D)üR
úB-ð(D)üS
2AüT:2AüU
gcd(abs(R),abs(T)üÁ
R/ÁüR:T/ÁüT
gcd(abs(S),abs(U)üÁ
S/ÁüS:U/ÁüU
1üN
If T>9:2üN
If T>99:3üN
If T=1:0üN
1üO
If abs(R)>9
2üO
If abs(R)>99
3üO:1üP
If U>9:2üP
If U>99:3üP
If U=1:0üP
1üQ
If abs(S)>9
2üQ
If abs(S)>99
3üQ
Output(5,1,"Factors:
Output(6,1,"(
If Nø0
Output(6,2,T
Output(6,2+N,"X
If Rù0
Output(6,3+N,"-
If R<0
Output(6,3+N,"+
Output(6,4+N,abs(R
If I=1
Output(6,4+N+O,"à
Output(6,4+N+O+I,")
Output(7,1,"(
If Pø0
Output(7,2,U
Output(7,2+P,"X
If Sù0
Output(7,3+P,"-
If S<0
Output(7,3+P,"+
Output(7,4+P,abs(S
If I=1
Output(7,4+P+Q,"à
Output(7,4+P+Q+I,")
If Wø0
Output(8,1,Z
Pause
ð(BÜ-4AC)üÁ
(úB+Á)/(2A)üX
(úB-Á)/(2A)üY
Disp " Solutions:",XÃ¥Frac,YÃ¥Frac
Output(8,1," "
Pause
ClrHome:Stop
End
Lbl Z1
Disp "-Not Factorable-":Pause
Goto 1

the input stuff goes over the disp on all lbls
Ok, first off, post your code using SourceCoder 2 ( sc.cemetech.net ) so that its actually readable. Then EXPLAIN your problem
Well, I'd say the number one problem with his/her code is the lbl/Goto statements...

Maybe it is the weird characters he/she uses?

But yes, a description of the problem would be very very nice as well as being useful.

@Mexi1010: I'd recommend taking your name out of the code, at least in your post unless you don't mind everyone knowing (just a warning).

Also:


Code:
:While G=0
:Getkey->G:End


can be replaced with


Code:
:Repeat GetKey:End


and replacing the G's in the next few statements with "Ans"

Did you intend for there to be all of those funky characters (some appear to be the sto key, or ->)?

Code:

0üG
While G=0
getKeyüG:End

If G=92:Then
Goto 2:End
If G=93:Then
Goto 3:End
If G=94:Then
Goto 4:End
If G=82:Then
Goto 5:End
If G=83:Then
Goto 6:End
If G=84:Then
ClrDraw
ClrHome:Stop
End


I have to complain about this. This will slow the execution of the calc down (true?, I use the method below because I think the above does slow the calc down). This is because it quits the loop, then checks for G, Unless every key as a function, this is fine, other wise, this is what I'd recomend:


Code:

0üX
While X=0
getKeyüG:
If G=92 or G=93 or G=94 or G=82 or G=83 or G=94
Xü1
End

If G=92:Then
Goto 2:End
If G=93:Then
Goto 3:End
If G=94:Then
Goto 4:End
If G=82:Then
Goto 5:End
If G=83:Then
Goto 6:End
If G=84:Then
ClrDraw
ClrHome:Return
End

Do that for every instance. And feel free to replace X with any variable. Just used X cause its like the univerasl symbol for a variable... Replaced 'Stop' with 'Return.' I got burned for it just recently... XD

Good luck!
b-flat wrote:
Maybe it is the weird characters he/she uses?

*blahblahblah*

Did you intend for there to be all of those funky characters (some appear to be the sto key, or ->)?


the "wonkey" characters are because of the copy/paste from ti-graphlink (hence my post about using SC2 instead) which uses a special font (with which the characters look fine)

Code:
:Output(1,1,"*****************//////////////**//////////////**Math Formulas/**//////////////**/By:Rod Serna/**//////////////*****************
:Pause
:Lbl 1
:ClrDraw:DispGraph:FnOff :‾47→Xmin:47→Xmax:‾31→Ymin:31→YMax:AxesOff
:Line(‾46,31,‾46,‾31
:Line(‾46,30,46,30
:Horizontal(31
:Horizontal(‾31
:Vertical 47
:Vertical ‾47
:Text(10,21,"Which Program?
:Text(20,5,"1:Circum.
:Text(26,5,"2:[Sy]s. of Equ.
:Text(32,5,"3:Quadratic
:Text(38,5,"4:Midpoint
:Text(44,5,"5:Tri. Fact.
:Text(50,5,"6:Exit
:0→G
:While G=0
:¦ getKey→G:End
:If G=92:Then
:¦ Goto 2:End
:If G=93:Then
:¦ Goto 3:End
:If G=94:Then
:¦ Goto 4:End
:If G=82:Then
:¦ Goto 5:End
:If G=83:Then
:¦ Goto 6:End
:If G=84:Then
:¦ ClrDraw
:¦ ClrHome:Stop
:End
:Goto 1
:Lbl 2
:ClrHome
:Disp "2rπ=Circum."
:0→G
:Input "r=",C
:ClrDraw
:(C2)→C
:DispGraph
:Text(10,14,"Circmference="
:Text(10,65,C,"π
:Text(20,11,"Would you like the ful
:Text(26,33,"answer?
:Text(36,10,"1:Yes"
:Text(36,68,"2:Quit"
:While G=0
:¦ getKey→G
:End
:If G=93:Then
:¦ ClrHome:ClrDraw
:¦ Stop:End
:If G=92:Then
:¦ (Cπ)→C
:¦ Text(46,16,"Circum.=",C
:¦ 0→G
:¦ While G=0
:¦ ¦ getKey→G
:¦ End
:¦ If G=45:Then
:¦ ¦ Goto 1
:¦ End
:¦ If G=93:Then
:¦ ¦ ClrHome
:¦ ¦ ClrDraw:Stop
:¦ End
:¦ Lbl 3
:¦ ClrHome
:¦ Disp "a1+b1=c1
:¦ Input "a1=",A
:¦ Input "b1=",B
:¦ Input "c1=",C
:¦ ClrHome
:¦ Disp "a2+b2=c2
:¦ Input "a2=",D
:¦ Input "b2=",E
:¦ Input "c2=",F
:¦ (B/A)→B
:¦ (C/A)→C
:¦ E+B*(‾D)→E
:¦ F+C*(‾D)→F
:¦ (F/E)→Y
:¦ (C-B*Y)→X
:¦ ClrDraw
:¦ DispGraph
:¦ Text(10,18,"The solution is...
:¦ Text(24,27,"(",X,",",Y,")"
:¦ Text(50,15,"Press ENTER to quit
:¦ Text(56,12,"or MODE to go to Menu
:¦ 0→G
:¦ While G=0
:¦ ¦ getKey→G
:¦ End
:¦ If G=105:Then
:¦ ¦ ClrHome
:¦ ¦ Stop:End
:¦ If G=22:Then
:¦ ¦ Goto 1:End
:¦ Lbl 4
:¦ ClrHome
:¦ Disp " ‾b(+-)√(b2-4ac)
:¦ Disp "x=--------------
:¦ Disp " 2a
:¦ Input "a=",A
:¦ Input "b=",B
:¦ Input "c=",C
:¦ √((B2)-4AC)→Z
:¦ Z→Y
:¦ (‾(B)+Z)→Z
:¦ (‾(B)-Y)→Y
:¦ Z/(2A)→D
:¦ Y/(2A)→E
:¦ ClrDraw
:¦ Text(20,1,"The answers are...
:¦ Text(28,60,D
:¦ Text(34,61,"and
:¦ Text(40,60,E
:¦ Text(46,20,"Hit ENTER to exit
:¦ Text(55,10,"or MODE to go to menu
:¦ 0→G
:¦ While G=0
:¦ ¦ getKey→G
:¦ End
:¦ If G=105:Then
:¦ ¦ ClrHome:ClrDraw
:¦ ¦ Stop:End
:¦ If G=22:Then
:¦ ¦ Goto 1:End
:¦ Goto 1
:¦ Lbl 5
:¦ ClrHome
:¦ Disp " x1+x2 y1+y2
:¦ Disp " M=-----,-----
:¦ Disp " 2 2
:¦ Input "x1=",X
:¦ Input "y1=",A
:¦ Input "x2=",W
:¦ Input "y2=",B
:¦ (X+W)→X
:¦ (A+B)→A
:¦ (X/2)→X
:¦ (A/2)→A
:¦ ClrDraw
:¦ DispGraph
:¦ Text(10,29,"Midpoint is...
:¦ Text(20,34,"(",X,",",A,")"
:¦ Text(28,23,"Hit ENTER to exit
:¦ Text(40,13,"or MODE to go to menu
:¦ 0→G
:¦ While G=0
:¦ ¦ getKey→G
:¦ End
:¦ If G=105:Then
:¦ ¦ ClrHome
:¦ ¦ ClrDraw
:¦ ¦ Stop:End
:¦ If G=22:Then
:¦ ¦ Goto 1:End
:¦ Lbl 6
:¦ ClrHome
:¦ Disp "AX2 BX C
:¦ Prompt A,B,C
:¦ abs(A),abs(B)→θ
:¦ abs(B),abs(C)→Z
:¦ abs(A),abs(C)→Y
:¦ θ,Z)→Z
:¦ Z,Y)→Z
:¦ A/Z→A:B/Z→B
:¦ C/Z→C:1→W
:¦ If Z>9:2→W
:¦ If Z>99:3→W
:¦ If Z=1:0→W
:¦ B2-4AC→D
:¦ 0→I
:¦ If D<0:1→I
:¦ abs(D)→D
:¦ If fPart(√(D))≠0:Goto Z1
:¦ ‾B+√(D)→R
:¦ ‾B-√(D)→S
:¦ 2A→T:2A→U
:¦ abs(R),abs(T)→θ
:¦ R/θ→R:T/θ→T
:¦ abs(S),abs(U)→θ
:¦ S/θ→S:U/θ→U
:¦ 1→N
:¦ If T>9:2→N
:¦ If T>99:3→N
:¦ If T=1:0→N
:¦ 1→O
:¦ If abs(R)>9
:¦ 2→O
:¦ If abs(R)>99
:¦ 3→O:1→P
:¦ If U>9:2→P
:¦ If U>99:3→P
:¦ If U=1:0→P
:¦ 1→Q
:¦ If abs(S)>9
:¦ 2→Q
:¦ If abs(S)>99
:¦ 3→Q
:¦ Output(5,1,"Factors:
:¦ Output(6,1,"(
:¦ If N≠0
:¦ Output(6,2,T
:¦ Output(6,2+N,"X
:¦ If R≥0
:¦ Output(6,3+N,"-
:¦ If R<0
:¦ Output(6,3+N,"+
:¦ Output(6,4+N,abs(R
:¦ If I=1
:¦ Output(6,4+N+O,"i
:¦ Output(6,4+N+O+I,")
:¦ Output(7,1,"(
:¦ If P≠0
:¦ Output(7,2,U
:¦ Output(7,2+P,"X
:¦ If S≥0
:¦ Output(7,3+P,"-
:¦ If S<0
:¦ Output(7,3+P,"+
:¦ Output(7,4+P,abs(S
:¦ If I=1
:¦ Output(7,4+P+Q,"i
:¦ Output(7,4+P+Q+I,")
:¦ If W≠0
:¦ Output(8,1,Z
:¦ Pause
:¦ √(B2-4AC)→θ
:¦ (‾B+θ)/(2A)→X
:¦ (‾B-θ)/(2A)→Y
:¦ Disp " Solutions:",X►Frac,Y►Frac
:¦ Output(8,1," "
:¦ Pause
:¦ ClrHome:Stop
:End
:Lbl Z1
:Disp "-Not Factorable-":Pause
:Goto 1


I source coded it up. try that mexi.
thx for everything I'm still testing out the different ways I"ll get back to you guys on how that went.
some18kanal0n3 wrote:


Code:

If G=92:Then
Goto 2:End
If G=93:Then
Goto 3:End
If G=94:Then
Goto 4:End
If G=82:Then
Goto 5:End
If G=83:Then
Goto 6:End
If G=84:Then
ClrDraw
ClrHome:Return
End


Did you even bother to optimize this close? There is not need for the thens and ends since it is only one command afterwords.
haha, no Rolling Eyes
completely skipped my mind XD
lafferjm wrote:
some18kanal0n3 wrote:


Code:

If G=92:Then
Goto 2:End
If G=93:Then
Goto 3:End
If G=94:Then
Goto 4:End
If G=82:Then
Goto 5:End
If G=83:Then
Goto 6:End
If G=84:Then
ClrDraw
ClrHome:Return
End


Did you even bother to optimize this close? There is not need for the thens and ends since it is only one command afterwords.
Not to mention the MASSIVE amount of memory leaking there...
absolutley right. Leaving a If/Then command without the end statement. Another reason why you should use my proposal, lemme tweak it though, I just kinda 'hurried' it along.


Code:

0üX
While X=0
getKeyüG:
If G=92 or G=93 or G=94 or G=82 or G=83 or G=94
Xü1
End

If G=92:Goto 2
If G=93:Goto 3
If G=94:Goto 4
If G=82:Goto 5
If G=83:Goto 6
If G=84:Then
ClrDraw
ClrHome:Return
End

There, do that for each similar thing, and you'll be set mate =P Well, at the glance I had... Didn't get much farther than that. =X Sorry.
  
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