top of page

Law of Cosine

  • Writer: Nathaniel Hillert
    Nathaniel Hillert
  • Oct 17, 2018
  • 2 min read

Updated: Oct 18, 2018

Law of Cosine isn't as used as Law of Sine, but it's pretty important when you're in a pinch. Let us get started.

  1. Create a new program and name it "LOCS" (For Law Of CoSine)

  2. Press "prgm", go to the "I/O" tab, and press "enter" on "ClrHome"

  3. Press "prgm", go to the "I/O" tab, and press "enter" on "Input"

  4. Type ""SIDE C OR ANGLE C (S OR A)"" then press comma

  5. Press "vars", go to "String" and select "Str1". Start a new line

  6. Press "prgm", go to the "I/O" tab, and select "If"

  7. Grab "Str1". Press "2nd" "math" and select "="

  8. Type ""S"" and start a new line

  9. Get "Then" from the "CTL" tab (The first tab after pressing "prgm"). Start a new line

  10. Repeat step 3 and type ""SIDE A: ",A". Start a new line

  11. Repeat step 3 and type ""SIDE B: ",B". Start a new line

  12. Repeat step 3 and type ""ANGLE C: ",C". Start a new line

  13. Type "√(A²+B²-2ABcos(C))→D" and start a new line

  14. Get "Disp" from the "I/O" tab, then type ""SIDE C: ",D". Start a new line

  15. Get "End" from the "CTL" tab, then start a new line

  16. Repeat steps 6 and 7, and type ""A"". Start a new line

  17. Repeat step 9

  18. Repeat step 10 and 11

  19. Repeat step 3 and type ""SIDE C: ",C". Start a new line

  20. Type "cos-1((C²-A²-B²)/(-2AB))→D"

  21. Get "Disp" from the "I/O" tab, then type ""AwNGLE C: ",D". Start a new line

  22. Repeat step 15 without starting a new line

  23. Your code should look like:

:ClrHome

:Input "SIDE C OR ANGLE C (S OR A)",Str1

:If Str1="S"

:Then

:Input "SIDE A: ",A

:Input "SIDE B: ",B

:Input "ANGLE C: ",C

:√(A²+B²-2ABcos(C))→D

:Disp "SIDE C: ",D

:If Str1="A"

:Then

:Input "SIDE A: ",A

:Input "SIDE B: ",B

:Input "SIDE C: ",C

:cos-1((C²-A²-B²)/(-2AB))→D

:Disp "ANGLE C: ",D

:End


So that is the program, use it whenever you feel like it. Give this a like if it was helpful. Drop a comment if you have any questions or need help. Happy programming!


-Nate

Recent Posts

See All
Summation Notation

Roughly 23 minutes. Ahh, isn't that just super fun to say? "Summation Notation" is displayed with the capitol Greek letter Sigma ( Σ )....

 
 
 
Law of Sine

So, one of the big things you will be using in any math class is "Law of Sine". For anyone that doesn't know what Law of Sine is:...

 
 
 

コメント


Post: Blog2_Post

Subscribe Form

Thanks for submitting!

©2018 by Nathaniel Hillert. Not so proudly created with Wix.com

  • Facebook
  • Twitter
  • LinkedIn
bottom of page