Advertisement
Guest User

HLP2.2.5

a guest
May 24th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. ClrHome
  2. Disp "Welcome to Ben's","Math Helper"
  3. Pause
  4. Menu("What do you need?","Pythag Theorem",1,"Quadratic Equations",2,"LCM or GCF",3,"Discriminant",4,"Exit",91)
  5. Lbl 1
  6. ClrHome
  7. Menu("Solve for what?","Hypotenuse",11,"Leg",22)
  8. Lbl 11
  9. Prompt A,B
  10. sqrt((A^2)+(B^2))->C
  11. If (A^2)+(B^2)<0
  12. Then
  13. Disp "No real answers!"
  14. Pause
  15. Stop
  16. Else
  17. Disp C
  18. Pause
  19. Stop
  20. Lbl 22
  21. Prompt C,B
  22. sqrt((C^2)-(B^2))->A
  23. If (C^2)-(B^2)<0
  24. Then
  25. Disp "No real answers!"
  26. Pause
  27. Stop
  28. Else
  29. Disp A
  30. Pause
  31. Stop
  32. Lbl 2
  33. ClrHome
  34. Prompt A,B,C
  35. If B^2-4AC<0
  36. Then
  37. Disp "No real answers!"
  38. Pause
  39. Stop
  40. Else
  41. (~B+sqrt(B^2-4AC))/(2A)->X
  42. (~B-sqrt(B^2-4AC))/(2A)->Y
  43. Disp "X=",X,"Y=",Y
  44. Pause
  45. Stop
  46. Lbl 3
  47. ClrHome
  48. Menu("LCM or GCF","LCM",33,"GCF",44)
  49. Lbl 33
  50. ClrHome
  51. Disp "1st num"
  52. Input A
  53. Disp "2nd num"
  54. Input B
  55. Disp lcm(A,B)
  56. Pause
  57. Stop
  58. Lbl 44
  59. ClrHome
  60. Disp "1st num"
  61. Input A
  62. Disp "2nd num"
  63. Input B
  64. Disp gcd(A,B)
  65. Pause
  66. Stop
  67. Lbl 4
  68. ClrHome
  69. Prompt A,B,C
  70. Disp "Discriminant:",B^2-4AC
  71. If B^2-4AC<0
  72. Then
  73. Disp "No Solutions"
  74. Pause
  75. Stop
  76. Else
  77. If B^2-4AC=0
  78. Then
  79. Disp "1 Solution"
  80. Pause
  81. Stop
  82. Else
  83. If B^2-4AC>0
  84. Then
  85. Disp "2 Solutions"
  86. Pause
  87. Stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement