Hello im have recently got a new graphing calculator calculator for school (9th grade). In maths im currently doing trigonometry with sin cos and tan. I am very basic in my programming skills so im asking for help with a program.

i want a program that can find angles and sides of a right angle triangle. i have a Casio fx CG 20. I want the program to first ask me where i want to find an angle or a side length and then i enter the information needed to find the angle or side length. Thank you.

Graphing Calculator Very Happy
Well for solving a triangle, it's pretty much using the law of sines and the law of cosines to solve them. If you know those, you could implement pretty much any case of solving a triangle.
[Deleted by user]
something like this is what im looking for

http://www.carbidedepot.com/formulas-trigright.asp
This is an excellent opportunity to practice some programming, so if you haven't read any tutorials already, try looking one up on Google, they will teach you the basics you need to now to accomplish this.

The functions that you can use are:
sin(
cos(
tan(

Code:

'ProgramMode:RUN
Deg:Fix 9:Lbl 1
Do
0->A~Z:{0,0,0,0}->List 1:List 1->List 2
BG-None:ClrText:Cls:ViewWindow 1,127,0,63,1,0
Text (1)*3,(1)*3,"Triangle solver"
Text (1)*3,(70)*3,"[EXP]:Exit"
Text (7)*3,(70)*3,"[DEL]:Clr all"
Blue F-Line 92,21,74,47:Blue F-Line 74,47,118,47:Blue F-Line 118,47,92,21
Blue Text (15)*3,(92)*3,"A":Blue Text (45)*3,(70)*3,"B":Blue Text (45)*3,(120)*3,"C"
Blue Text (49)*3,(94)*3,"a":Blue Text (30)*3,(108)*3,"b":Blue Text (30)*3,(78)*3,"c"
14->I:Text (13)*3,(I)*3,"A=":Text (19)*3,(I)*3,"a=":Text (25)*3,(I)*3,"B=":Text (31)*3,(I)*3,"b=":Text (37)*3,(I)*3,"C=":Text (43)*3,(I)*3,"c=":Text (49)*3,(1)*3,"Area="
For 2->I To 107 Step 21:Blue F-Line I,63,I,56:Blue F-Line I,56,I+18,56:Next
Blue Text (58)*3,(4)*3," A ":Blue Text (58)*3,(25)*3," a ":Blue Text (58)*3,(46)*3," B ":Blue Text (58)*3,(67)*3," b ":Blue Text (58)*3,(88)*3," C ":Blue Text (58)*3,(109)*3," c ":PxlOn 1,1
Do
Do:Getkey->K:LpWhile K=0
If K=51:Then Norm :ClrText:Stop:IfEnd
K=44=>9->S
If K=79:Then "Angle A="?->V:V->List 1[1]:V<>0=>Isz A:Text (13)*3,(23)*3,V:IfEnd
If K=69:Then "Side  a="?->V:V->List 2[1]:V<>0=>Isz S:Text (19)*3,(23)*3,V:IfEnd
If K=59:Then "Angle B="?->V:V->List 1[2]:V<>0=>Isz A:Text (25)*3,(23)*3,V:IfEnd
If K=49:Then "Side  b="?->V:V->List 2[2]:V<>0=>Isz S:Text (31)*3,(23)*3,V:IfEnd
If K=39:Then "Angle C="?->V:V->List 1[3]:V<>0=>Isz A:Text (37)*3,(23)*3,V:IfEnd
If K=29:Then "Side  c="?->V:V->List 2[3]:V<>0=>Isz S:Text (43)*3,(23)*3,V:IfEnd
PxlOn 1,1
LpWhile S=0 Or A+S<3
LpWhile K=44
If A+S=3 And S<>3
Then 0->I
Do
Isz I
List 1[I]<>0=>I->C
List 2[I]<>0=>I->D
LpWhile (List 1[I]=0 Or List 2[I]=0) And I<4
I<4=>I->P
If P=0
Then If S=2
Then 2->U
1+C->J:2+C->K
J>3=>J-3->J
K>3=>K-3->K
Sqrt(List 2[K]^<2>+List 2[J]^<2>-2*List 2[J]*List 2[K]*cos List 1[C])->List 2[C]
Isz S
C->P
Else D->P
IfEnd:IfEnd:IfEnd
If S=3
Then For 1->I To 3
1+I->J
2+I->K
J>3=>J-3->J
K>3=>K-3->K
cos^-1 ((List 2[J]^<2>+List 2[K]^<2>-List 2[I]^<2>)/(2*List 2[J]*List 2[K]))->List 1[I]
Next
3->A
IfEnd
If A=1
Then 0->I
Do
Isz I
LpWhile List 2[I]=0 Or List 1[I]<>0
sin^-1 (List 2[I]*sin List 1[P]/List 2[P])->List 1[I]
2->A
If List 1[P]<List 1[I] And U<>2
Then 1->U
List 1->List 3
180-List 1[I]->List 3[I]
180-List 3[P]-List 3[I]->List 3[6-I-P]
List 2->List 4
IfEnd:IfEnd
If A=2
Then List 1[1]+List 1[2]+List 1[3]->T
For 1->I To 3
List 1[I]=0=>180-T->List 1[I]
Next:IfEnd
If S<>3
Then For 1->I To 3
List 2[I]=0=>sin List 1[I]*List 2[P]/sin List 1[P]->List 2[I]
If U=1
Then List 4[I]=0=>sin List 3[I]*List 4[P]/sin List 3[P]->List 4[I]
IfEnd
Next
IfEnd
Text (13)*3,(23)*3,List 1[1]
Text (19)*3,(23)*3,List 2[1]
Text (25)*3,(23)*3,List 1[2]
Text (31)*3,(23)*3,List 2[2]
Text (37)*3,(23)*3,List 1[3]
Text (43)*3,(23)*3,List 2[3]
Text (49)*3,(23)*3,.5*List 2[1]*List 2[2]*sin List 1[3]
If U=1
Then Text (13)*3,(63)*3,List 3[1]
Text (19)*3,(63)*3,List 4[1]
Text (25)*3,(63)*3,List 3[2]
Text (31)*3,(63)*3,List 4[2]
Text (37)*3,(63)*3,List 3[3]
Text (43)*3,(63)*3,List 4[3]
Text (49)*3,(63)*3,.5*List 4[1]*List 4[2]*sin List 3[3]
IfEnd
PxlOn 1,1
Do:Getkey->K:LpWhile K=0
K=44=>Goto 1
Cls:ClrText:Fix 4
Please please please use the code tags when posting code!

Edit: Thank you for the fix!
Thank you Smile that was greatly appreciated Very Happy
when i put the program in to my prizm and run it it gives me a syntax error. i think that might be that I've installed it incorrectly or that the first command "'ProgramMode:run" is wrong because when i go into then code and skip through it, it goes by each individual letter instead of skipping until the and as it would to for any other command such as "then" or "else" where would i find the "'ProgramMode" command in my calculator?
first press new and make a name for the program "trisolve" and then hit run in the bottom left corner of the screen on your calc. Next copy the code and then place it in this program and delete the first line with the program run in it and this should work
It's not because of the first line (it is ignored because it is a comment), it's because every single line has a space at the end. See my post: http://www.cemetech.net/forum/viewtopic.php?p=215183#215183
  
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