Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Degree
- ClrHome
- Disp " Welcome."
- Disp ""
- Disp "Use this to find"
- Disp "all the unknowns"
- Disp "of a triangle."
- Disp ""
- Disp "By Basheer Tome"
- Pause
- ClrHome
- Disp "Also, make sure"
- Disp "that the angles"
- Disp "or the sides"
- Disp "are in order"
- Disp "for AAS and SSA"
- Disp "triangles."
- Pause
- ClrHome
- Menu("Type of triangle","SSS",1,"SAS",2,"ASA",3,"AAS",4,"SSA",5)
- Lbl 1
- Disp "Input side [a]"
- Prompt (A)
- Disp "Input side [b]"
- Prompt (B)
- Disp "Input side [c]"
- Prompt (C)
- If A+B≤C or A+C≤B or B+C≤A:Then
- Goto R
- End
- A-B-C
- Ans/(–2*B*C)
- cos(Ans)
- Ans→T
- B-A-C
- Ans/(–2*A*C)
- cos(Ans)
- Ans→U
- 180-T-U
- Ans→V
- Goto H
- Lbl H
- ClrHome
- Disp " The area is:"
- Disp ""
- A+B+C
- Ans/2
- Ans→X
- X(X-A)(X-B)(X-C)
- √(Ans)
- Ans→J
- Disp J
- Disp ""
- Disp ""
- Disp ""
- Disp " More-->"
- Pause
- ClrHome
- A
- Output(1,3,Ans)
- Disp "a="
- B
- Output(2,3,Ans)
- Disp "b="
- C
- Output(3,3,Ans)
- Disp "c="
- T
- Output(4,3,Ans)
- Disp "A="
- U
- Output(5,3,Ans)
- Disp "B="
- V
- Output(6,3,Ans)
- Disp "C="
- Stop
- Lbl 2
- Disp "Input side 1"
- Prompt (A)
- Disp "Input the angle"
- Prompt (T)
- Disp "Input side 2"
- Prompt B
- A+B
- Ans-2(A)(B)(cos(T))
- √(Ans)
- Ans→C
- If A+B≤C or A+C≤B or B+C≤A:Then
- Goto R
- End
- B-A-C
- Ans/(–2*A*C)
- cos(Ans)
- Ans→U
- 180-T-U
- Ans→V
- Goto H
- Lbl 3
- Disp "Input angle 1"
- Prompt (T)
- Disp "Input the side"
- Prompt (C)
- Disp "Input angle 2"
- Prompt (U)
- 180-T-U
- Ans→V
- Csin(T)/sin(V)
- Ans→A
- Csin(U)/sin(V)
- Ans→B
- If A+B≤C or A+C≤B or B+C≤A:Then
- Goto R
- End
- Goto H
- Lbl 4
- Disp "Input angle 1"
- Prompt (T)
- Disp "Input angle 2"
- Prompt (U)
- Disp "Input the side"
- Prompt (A)
- 180-T-U
- Ans→V
- Asin(U)/sin(T)
- Ans→B
- Asin(V)/sin(T)
- Ans→C
- If A+B≤C or A+C≤B or B+C≤A:Then
- Goto R
- End
- Goto H
- Lbl 5
- Disp "Input side 1"
- Prompt (A)
- Disp "Input side 2"
- Prompt (B)
- Disp "Input the angle"
- Prompt (T)
- Bsin(T)
- Ans→F
- If A<F:Then
- Goto R
- Lbl R
- ClrHome
- Disp " The area is:"
- Disp ""
- Disp "Not a triangle."
- Disp ""
- Disp ""
- Disp ""
- End
- If A=F or A≥B:Then
- Bsin(T)/A
- sin(Ans)
- Ans→U
- 180-T-U
- Ans→V
- Asin(V)/sin(T)
- Ans→C
- If A+B≤C or A+C≤B or B+C≤A:Then
- Goto R
- End
- ClrHome
- Disp " The area is:"
- Disp ""
- A+B+C
- Ans/2
- Ans→X
- X(X-A)(X-B)(X-C)
- √(Ans)
- Ans→J
- Disp Ans
- Disp ""
- Disp ""
- Disp " More-->"
- Pause
- ClrHome
- A
- Output(1,3,Ans)
- Disp "a="
- B
- Output(2,3,Ans)
- Disp "b="
- C
- Output(3,3,Ans)
- Disp "c="
- T
- Output(4,3,Ans)
- Disp "A="
- U
- Output(5,3,Ans)
- Disp "B="
- V
- Output(6,3,Ans)
- Disp "C="
- End
- If A>F and A<B:Then
- Bsin(T)/A
- sin(Ans)
- Ans→U
- 180-T-U
- Ans→V
- Asin(V)/sin(T)
- Ans→C
- A+B+C
- Ans/2
- Ans→X
- X(X-A)(X-B)(X-C)
- √(Ans)
- Ans→J
- 180-U
- Ans→P
- 180-A-P
- Ans→Q
- Asin(Q)/sin(T)
- Ans→N
- A+B+N
- Ans/2
- Ans→Z
- Z(Z-A)(Z-B)(Z-N)
- √(Ans)
- Ans→K
- If A+B≤C or A+C≤B or B+C≤B:Then
- Goto r
- End
- ClrHome
- Disp " The area is:"
- Disp ""
- Disp J
- Disp " Or"
- Disp K
- Disp ""
- Disp " More-->"
- Pause
- ClrHome
- A
- Output(1,3,Ans)
- Disp "a="
- B
- Output(2,3,Ans)
- Disp "b="
- C
- Output(3,3,Ans)
- Disp "c="
- T
- Output(4,3,Ans)
- Disp "A="
- U
- Output(5,3,Ans)
- Disp "B="
- V
- Output(6,3,Ans)
- Disp "C="
- Disp " More-->"
- Pause
- ClrHome
- A
- Output(1,3,Ans)
- Disp "a="
- B
- Output(2,3,Ans)
- Disp "b="
- N
- Output(3,3,Ans)
- Disp "c="
- T
- Output(4,3,Ans)
- Disp "A="
- P
- Output(5,3,Ans)
- Disp "B="
- Q
- Output(6,3,Ans)
- Disp "C="
- End
Add Comment
Please, Sign In to add comment