Advertisement
Aes_Sedia5

MATHPACK(Chem)

Dec 1st, 2011
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :Program ZZCHEM
  2. :While 1
  3. :¦ ClrDraw
  4. :¦ "MADE BY AES SEDIA5→Str0
  5. :¦ "CEMETECH.NET→Str9
  6. :¦ Text(1,31,"CHEMISTRY
  7. :¦ Text(7,1,"1.CONVERT TEMPERATURES
  8. :¦ Text(13,1,"2.SOLVE GAS LAWS
  9. :¦ Text(19,1,"4.EXIT
  10. :¦ Text(49,1,Str0
  11. :¦ Text(55,1,Str9
  12. :¦ Repeat K
  13. :¦ ¦ getKey→K
  14. :¦ End
  15. :¦ If K=82
  16. :¦ Then
  17. :¦ ¦ ClrDraw
  18. :¦ ¦ Text(1,13,"THANKS FOR USING
  19. :¦ ¦ Text(13,31,"CEMISTRY
  20. :¦ ¦ Text(25,13,"FROM THE FIVE
  21. :¦ ¦ Text(37,13,"PACK OF MATH
  22. :¦ ¦ Text(49,1,Str0
  23. :¦ ¦ Text(55,1,Str9
  24. :¦ ¦ rand(100
  25. :¦ ¦ ClrDraw
  26. :¦ ¦ Disp
  27. :¦ ¦ Return
  28. :¦ End
  29. :¦ If K=92
  30. :¦ Then
  31. :¦ ¦ Lbl T
  32. :¦ ¦ "CELCIUS"→Str1
  33. :¦ ¦ "FAHRENHEIT"→Str2
  34. :¦ ¦ "KELVIN"→Str3
  35. :¦ ¦ ClrHome
  36. :¦ ¦ ClrDraw
  37. :¦ ¦ Input Str1,C
  38. :¦ ¦ Input Str2,F
  39. :¦ ¦ Input Str3,K
  40. :¦ ¦ Repeat CFK
  41. :¦ ¦ ¦ If Knot(C
  42. :¦ ¦ ¦ K-273.15→C
  43. :¦ ¦ ¦ If Fnot(C
  44. :¦ ¦ ¦ 5(F-32)/9→C
  45. :¦ ¦ ¦ If Knot(F
  46. :¦ ¦ ¦ Then
  47. :¦ ¦ ¦ ¦ K-273.15→C
  48. :¦ ¦ ¦ ¦ C9(C+32)/5→F
  49. :¦ ¦ ¦ End
  50. :¦ ¦ ¦ If Knot(F
  51. :¦ ¦ ¦ 9(C+32)/5→F
  52. :¦ ¦ ¦ If Cnot(K
  53. :¦ ¦ ¦ C+273.15→K
  54. :¦ ¦ ¦ If Fnot(K
  55. :¦ ¦ ¦ 5(F-32)/9→C
  56. :¦ ¦ ¦ C+273.15→K
  57. :¦ ¦ End
  58. :¦ ¦ Disp Str1
  59. :¦ ¦ Pause C
  60. :¦ ¦ Disp Str2
  61. :¦ ¦ Pause F
  62. :¦ ¦ Disp Str3
  63. :¦ ¦ Pause K
  64. :¦ End
  65. :¦ If K=93
  66. :¦ Then
  67. :¦ ¦ ClrHome
  68. :¦ ¦ ClrDraw
  69. :¦ ¦ Text(1,1,"SOLVE GAS LAWS
  70. :¦ ¦ rand(50
  71. :¦ ¦ ClrDraw
  72. :¦ ¦ Text(1,1,"CHANGE TEMP TO KELVIN"
  73. :¦ ¦ Text(25,1,"1.YES
  74. :¦ ¦ Text(31,1,"0.NO
  75. :¦ ¦ Text(49,1,Str0
  76. :¦ ¦ Text(55,1,Str9
  77. :¦ ¦ Repeat Ans
  78. :¦ ¦ ¦ getKey
  79. :¦ ¦ End
  80. :¦ ¦ If Ans=92
  81. :¦ ¦ Goto T
  82. :¦ ¦ If Ans=102
  83. :¦ ¦ Then
  84. :¦ ¦ ¦ ClrDraw
  85. :¦ ¦ ¦ Text(1,1,"ARE YOU USING STANDARD"
  86. :¦ ¦ ¦ Text(7,1,"TEMP AND PRESSURE"
  87. :¦ ¦ ¦ Text(25,1,"1.YES
  88. :¦ ¦ ¦ Text(37,1,"2.NO
  89. :¦ ¦ ¦ Repeat J
  90. :¦ ¦ ¦ ¦ getKey→J
  91. :¦ ¦ ¦ End
  92. :¦ ¦ ¦ If J=92
  93. :¦ ¦ ¦ Then
  94. :¦ ¦ ¦ ¦ Input "VOLUME",V
  95. :¦ ¦ ¦ ¦ Input "TEMP IN KELVIN",T
  96. :¦ ¦ ¦ ¦ Input "PRESSURE",P
  97. :¦ ¦ ¦ ¦ If T>273
  98. :¦ ¦ ¦ ¦ Then
  99. :¦ ¦ ¦ ¦ ¦ T/273→A
  100. :¦ ¦ ¦ ¦ ¦ Else
  101. :¦ ¦ ¦ ¦ ¦ 273/T→B
  102. :¦ ¦ ¦ ¦ End
  103. :¦ ¦ ¦ ¦ If P>101.3
  104. :¦ ¦ ¦ ¦ Then
  105. :¦ ¦ ¦ ¦ ¦ 101.3/P→C
  106. :¦ ¦ ¦ ¦ ¦ Else
  107. :¦ ¦ ¦ ¦ ¦ P/101.3→D
  108. :¦ ¦ ¦ ¦ End
  109. :¦ ¦ ¦ ¦ If T>273 and P>101.3
  110. :¦ ¦ ¦ ¦ VAC
  111. :¦ ¦ ¦ ¦ If T>273 and P<101.3
  112. :¦ ¦ ¦ ¦ VAD
  113. :¦ ¦ ¦ ¦ If T<273 and P>101.3
  114. :¦ ¦ ¦ ¦ VBC
  115. :¦ ¦ ¦ ¦ If T<273 and P<101.3
  116. :¦ ¦ ¦ ¦ VBD
  117. :¦ ¦ ¦ ¦ Pause Ans
  118. :¦ ¦ ¦ End
  119. :¦ ¦ ¦ If J=102
  120. :¦ ¦ ¦ Then
  121. :¦ ¦ ¦ ¦ Input "VOLUME",V
  122. :¦ ¦ ¦ ¦ Input "TEMP1",A
  123. :¦ ¦ ¦ ¦ Input "TEMP2",B
  124. :¦ ¦ ¦ ¦ Input "PRESSURE1",C
  125. :¦ ¦ ¦ ¦ Input "PRESSURE2",D
  126. :¦ ¦ ¦ ¦ If A≥B and C≥D
  127. :¦ ¦ ¦ ¦ V(B/A)(C/D)
  128. :¦ ¦ ¦ ¦ If B≥A and C≥D
  129. :¦ ¦ ¦ ¦ V(A/B)(C/D)
  130. :¦ ¦ ¦ ¦ If A≥B and D≥C
  131. :¦ ¦ ¦ ¦ V(B/A)(D/C)
  132. :¦ ¦ ¦ ¦ If B≥A and D≥C
  133. :¦ ¦ ¦ ¦ V(A/B)(D/C)
  134. :¦ ¦ ¦ ¦ Pause Ans
  135. :¦ ¦ ¦ End
  136. :¦ ¦ End
  137. :¦ End
  138. :End
  139.  
  140.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement