Guest User

Untitled

a guest
May 22nd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. Degree
  2. ClrHome
  3. Disp " Welcome."
  4. Disp ""
  5. Disp "Use this to find"
  6. Disp "all the unknowns"
  7. Disp "of a triangle."
  8. Disp ""
  9. Disp "By Basheer Tome"
  10. Pause
  11. ClrHome
  12. Disp "Also, make sure"
  13. Disp "that the angles"
  14. Disp "or the sides"
  15. Disp "are in order"
  16. Disp "for AAS and SSA"
  17. Disp "triangles."
  18. Pause
  19. ClrHome
  20. Menu("Type of triangle","SSS",1,"SAS",2,"ASA",3,"AAS",4,"SSA",5)
  21. Lbl 1
  22. Disp "Input side [a]"
  23. Prompt (A)
  24. Disp "Input side [b]"
  25. Prompt (B)
  26. Disp "Input side [c]"
  27. Prompt (C)
  28. If A+B≤C or A+C≤B or B+C≤A:Then
  29. Goto R
  30. End
  31. A-B-C
  32. Ans/(–2*B*C)
  33. cos(Ans)
  34. Ans→T
  35. B-A-C
  36. Ans/(–2*A*C)
  37. cos(Ans)
  38. Ans→U
  39. 180-T-U
  40. Ans→V
  41. Goto H
  42. Lbl H
  43. ClrHome
  44. Disp " The area is:"
  45. Disp ""
  46. A+B+C
  47. Ans/2
  48. Ans→X
  49. X(X-A)(X-B)(X-C)
  50. √(Ans)
  51. Ans→J
  52. Disp J
  53. Disp ""
  54. Disp ""
  55. Disp ""
  56. Disp " More-->"
  57. Pause
  58. ClrHome
  59. A
  60. Output(1,3,Ans)
  61. Disp "a="
  62. B
  63. Output(2,3,Ans)
  64. Disp "b="
  65. C
  66. Output(3,3,Ans)
  67. Disp "c="
  68. T
  69. Output(4,3,Ans)
  70. Disp "A="
  71. U
  72. Output(5,3,Ans)
  73. Disp "B="
  74. V
  75. Output(6,3,Ans)
  76. Disp "C="
  77. Stop
  78. Lbl 2
  79. Disp "Input side 1"
  80. Prompt (A)
  81. Disp "Input the angle"
  82. Prompt (T)
  83. Disp "Input side 2"
  84. Prompt B
  85. A+B
  86. Ans-2(A)(B)(cos(T))
  87. √(Ans)
  88. Ans→C
  89. If A+B≤C or A+C≤B or B+C≤A:Then
  90. Goto R
  91. End
  92. B-A-C
  93. Ans/(–2*A*C)
  94. cos(Ans)
  95. Ans→U
  96. 180-T-U
  97. Ans→V
  98. Goto H
  99. Lbl 3
  100. Disp "Input angle 1"
  101. Prompt (T)
  102. Disp "Input the side"
  103. Prompt (C)
  104. Disp "Input angle 2"
  105. Prompt (U)
  106. 180-T-U
  107. Ans→V
  108. Csin(T)/sin(V)
  109. Ans→A
  110. Csin(U)/sin(V)
  111. Ans→B
  112. If A+B≤C or A+C≤B or B+C≤A:Then
  113. Goto R
  114. End
  115. Goto H
  116. Lbl 4
  117. Disp "Input angle 1"
  118. Prompt (T)
  119. Disp "Input angle 2"
  120. Prompt (U)
  121. Disp "Input the side"
  122. Prompt (A)
  123. 180-T-U
  124. Ans→V
  125. Asin(U)/sin(T)
  126. Ans→B
  127. Asin(V)/sin(T)
  128. Ans→C
  129. If A+B≤C or A+C≤B or B+C≤A:Then
  130. Goto R
  131. End
  132. Goto H
  133. Lbl 5
  134. Disp "Input side 1"
  135. Prompt (A)
  136. Disp "Input side 2"
  137. Prompt (B)
  138. Disp "Input the angle"
  139. Prompt (T)
  140. Bsin(T)
  141. Ans→F
  142. If A<F:Then
  143. Goto R
  144. Lbl R
  145. ClrHome
  146. Disp " The area is:"
  147. Disp ""
  148. Disp "Not a triangle."
  149. Disp ""
  150. Disp ""
  151. Disp ""
  152. End
  153. If A=F or A≥B:Then
  154. Bsin(T)/A
  155. sin(Ans)
  156. Ans→U
  157. 180-T-U
  158. Ans→V
  159. Asin(V)/sin(T)
  160. Ans→C
  161. If A+B≤C or A+C≤B or B+C≤A:Then
  162. Goto R
  163. End
  164. ClrHome
  165. Disp " The area is:"
  166. Disp ""
  167. A+B+C
  168. Ans/2
  169. Ans→X
  170. X(X-A)(X-B)(X-C)
  171. √(Ans)
  172. Ans→J
  173. Disp Ans
  174. Disp ""
  175. Disp ""
  176. Disp " More-->"
  177. Pause
  178. ClrHome
  179. A
  180. Output(1,3,Ans)
  181. Disp "a="
  182. B
  183. Output(2,3,Ans)
  184. Disp "b="
  185. C
  186. Output(3,3,Ans)
  187. Disp "c="
  188. T
  189. Output(4,3,Ans)
  190. Disp "A="
  191. U
  192. Output(5,3,Ans)
  193. Disp "B="
  194. V
  195. Output(6,3,Ans)
  196. Disp "C="
  197. End
  198. If A>F and A<B:Then
  199. Bsin(T)/A
  200. sin(Ans)
  201. Ans→U
  202. 180-T-U
  203. Ans→V
  204. Asin(V)/sin(T)
  205. Ans→C
  206. A+B+C
  207. Ans/2
  208. Ans→X
  209. X(X-A)(X-B)(X-C)
  210. √(Ans)
  211. Ans→J
  212. 180-U
  213. Ans→P
  214. 180-A-P
  215. Ans→Q
  216. Asin(Q)/sin(T)
  217. Ans→N
  218. A+B+N
  219. Ans/2
  220. Ans→Z
  221. Z(Z-A)(Z-B)(Z-N)
  222. √(Ans)
  223. Ans→K
  224. If A+B≤C or A+C≤B or B+C≤B:Then
  225. Goto r
  226. End
  227. ClrHome
  228. Disp " The area is:"
  229. Disp ""
  230. Disp J
  231. Disp " Or"
  232. Disp K
  233. Disp ""
  234. Disp " More-->"
  235. Pause
  236. ClrHome
  237. A
  238. Output(1,3,Ans)
  239. Disp "a="
  240. B
  241. Output(2,3,Ans)
  242. Disp "b="
  243. C
  244. Output(3,3,Ans)
  245. Disp "c="
  246. T
  247. Output(4,3,Ans)
  248. Disp "A="
  249. U
  250. Output(5,3,Ans)
  251. Disp "B="
  252. V
  253. Output(6,3,Ans)
  254. Disp "C="
  255. Disp " More-->"
  256. Pause
  257. ClrHome
  258. A
  259. Output(1,3,Ans)
  260. Disp "a="
  261. B
  262. Output(2,3,Ans)
  263. Disp "b="
  264. N
  265. Output(3,3,Ans)
  266. Disp "c="
  267. T
  268. Output(4,3,Ans)
  269. Disp "A="
  270. P
  271. Output(5,3,Ans)
  272. Disp "B="
  273. Q
  274. Output(6,3,Ans)
  275. Disp "C="
  276. End
Add Comment
Please, Sign In to add comment