Okay so I am trying to make a program that solves the law of sines for the ti-84 cse and I got 2 working for the law of cosines, but whenever I run the program on my calc (ti-84 cse) I always get the first answer =1 the second=2 and the third=0 I'm sure its a small bug, but I can't figure it out.


Code:
Input "Side a=",A
Input "Angle A=",B
Input "Angle B=",C
180-B-C=D
(sin(C))((A)/sin(B))=E
(sin(D))(((A)/sin(B))=F
Disp "Angle C=",D
Disp "Side B=",E
Disp "Side C=",F
Okay, one quick question first, are those equal signs actually store symbols? Otherwise D,E, and F are never modified. I will see how it works really quick as well.
MateoConLechuga wrote:
Okay, one quick question first, are those equal signs actually store symbols? Otherwise D,E, and F are never modified. I will see how it works really quick as well.

I haven't a clue, I don't really know what I'm doing, I'm just attempting this with my very, very vague knowledge of computer programming. I don't know if it does store it, that could very well be the problem, but I don't know.
With a bit of optimization:

Code:
Input "Side a=",A
Input "Angle A=",B
Input "Angle B=",C
180-B-C→D
Asin(C)/sin(B)→E
Asin(D)/sin(B)→F
Disp "Angle C=",D,"Side B=",E,"Side C=",F


"=" is used to compare values; it evaluates as 1 if the expressions to the left and right of it are equal, otherwise it evaluates as 0.
"→" (the STO→ key) sets a variable equal to the expression that precedes it.

See the TI-84 Plus C Silver Edition guidebook, chapter 16 / page 276. It provides an introduction to programming the TI-84 Plus C Silver Edition. For a thorough course on TI-83 series programm, there's KermMartian's book Programming the TI-83 Plus/TI-84 Plus.
Nicely done!
  
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