home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Educational / CONVERSION.2 (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  4KB  |  141 lines

  1. 50 GOTO1000
  2. 90 POKE53281,15
  3. 91 PRINT"[147][144]                                    [146]"
  4. 92 PRINT"[144]     CHOOSE THE CONVERSION CHART    [146]"
  5. 94 PRINT"[144]     YOU WISH TO CREATE...          [146]"
  6. 96 PRINT"[144]                                    [146]"
  7. 110 PRINT""
  8. 120 PRINT"     1- CENTIGRADE TO FAHRENHEIT"
  9. 122 PRINT"     2- FAHRENHEIT TO CENTIGRADE"
  10. 124 PRINT"     3- LITTERS TO GALLONS"
  11. 126 PRINT"     4- GALLONS TO LITERS"
  12. 128 PRINT"     5- KILOMETERS TO MILES"
  13. 130 PRINT"     6- MILES TO KILOMETERS"
  14. 132 PRINT"     7- CENTIMETERS TO INCHES"
  15. 134 PRINT"     8- INCHES TO CENTIMETERS"
  16. 136 PRINT"     9- POUNDS TO KILOGRAMS"
  17. 138 PRINT"    10- KILOGRAMS TO POUNDS"
  18. 140 PRINT"    11- GRAMS TO OUNCES"
  19. 142 PRINT"    12- OUNCES TO GRAMS"
  20. 150 INPUT"        ENTER NUMBER";X
  21. 152 IFX=1THENA$="CENTIGRADE":B$="FAHRENHEIT":GOTO500
  22. 154 IFX=2THENA$="FAHRENHEIT":B$="CENTIGRADE":GOTO500
  23. 156 IFX=3THENA$="LITERS":B$="GALLONS":GOTO500
  24. 158 IFX=4THENA$="GALLONS":B$="LITERS":GOTO500
  25. 160 IFX=5THENA$="KILOMETERS":B$="MILES":GOTO500
  26. 162 IFX=6THENA$="MILES":B$="KILOMETERS":GOTO500
  27. 164 IFX=7THENA$="CENTIMETERS":B$="INCHES":GOTO500
  28. 166 IFX=8THENA$="INCHES":B$="CENTIMETERS":GOTO500
  29. 168 IFX=9THENA$="POUNDS":B$="KILOGRAMS":GOTO500
  30. 170 IFX=10THENA$="KILOGRAMS":B$="POUNDS":GOTO500
  31. 172 IFX=11THENA$="GRAMS":B$="OUNCES":GOTO500
  32. 174 IFX=12THENA$="OUNCES":B$="GRAMS":GOTO500
  33. 500 POKE53281,12
  34. 503 PRINT"[147][144]        "A$" TO "B$
  35. 505 PRINT"          CONVERSION TABLE"
  36. 510 INPUT"[158]ENTER RANGE FROM";A
  37. 511 PRINTTAB(25)"[145]"A$
  38. 512 INPUT"[153]              TO";T
  39. 513 PRINTTAB(25)"[145]"A$
  40. 514 INPUT"ENTER INCREMENTS";I
  41. 515 GOTO903
  42. 516 PRINT"[147]"
  43. 518 PRINTTAB(6)""A$;:PRINTTAB(20)"[144]"B$
  44. 519 PRINT" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][144][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  45. 520 IFX=1THENB=9*A/5+32
  46. 522 IFX=2THENB=(A-32)*5/9
  47. 524 IFX=3THENB=A/3.7854
  48. 526 IFX=4THENB=A*3.7854
  49. 528 IFX=5THENB=A*.621
  50. 530 IFX=6THENB=A*1.609
  51. 532 IFX=7THENB=A*.3937
  52. 534 IFX=8THENB=A*2.54
  53. 536 IFX=9THENB=A*.4536
  54. 538 IFX=10THENB=A*2.2046
  55. 540 IFX=11THENB=A*.03527
  56. 542 IFX=12THENB=A*28.35
  57. 600 PRINTTAB(8)""A;:PRINTTAB(20)"[144]"B
  58. 605 A=A+I:IFA<=TTHEN520
  59. 610 PRINT"[158]   PRESS (R) TO REPEAT * (E) TO END  [146]"
  60. 620 GETED$:IFED$=""THEN620
  61. 623 IFED$="R"THEN90
  62. 625 IFED$="E"THEN3500
  63. 645 OPEN1,4
  64. 650 PRINT#1,"           CONVERSION TABLE"
  65. 655 PRINT#1,"          "A$" TO "B$
  66. 660 PRINT#1,TAB(3)A$;:PRINT#1,TAB(20)B$
  67. 662 IFX=1THENB=9*A/5+32
  68. 664 IFX=2THENB=(A-32)*5/9
  69. 666 IFX=3THENB=A/3.7854
  70. 668 IFX=4THENB=A*3.7854
  71. 670 IFX=5THENB=A*.621
  72. 672 IFX=6THENB=A*1.609
  73. 674 IFX=7THENB=A*.3937
  74. 676 IFX=8THENB=A*2.54
  75. 678 IFX=9THENB=A*.4536
  76. 680 IFX=10THENB=A*2.2046
  77. 682 IFX=11THENB=A*.03527
  78. 684 IFX=12THENB=A*28.35
  79. 700 PRINT#1,TAB(8)A;:PRINT#1,TAB(20)B
  80. 710 A=A+I:IFA<=TTHEN662
  81. 715 CLOSE1,4
  82. 720 PRINT"[158]   PRESS (R) TO REPEAT * (E) TO END  [146]"
  83. 725 GETED$:IFED$=""THEN725
  84. 730 IFED$="R"THEN90
  85. 735 IFED$="E"THEN3500
  86. 903 PRINT"                                      [146]"
  87. 904 PRINT"  PRESS (S) TO DISPLAY THE CONVERSION [146]"
  88. 905 PRINT"            CHART ON THE SCREEN.      [146]"
  89. 906 PRINT"                                      [146]"
  90. 909 PRINT"[144]                                      [146]"
  91. 910 PRINT"  PRESS (P) TO MAKE A PRINTOUT OF THE [146]"
  92. 911 PRINT"            CONVERSION CHART.         [146]"
  93. 912 PRINT"                                      [146]"
  94. 920 GETPP$:IFPP$=""THEN920
  95. 930 IFPP$="P"THEN645
  96. 940 IFPP$="S"THEN3000
  97. 1000 PRINT"[147]":POKE53281,5:POKE53280,0
  98. 1010 PRINT"[158]CONVERSION CHART MAKER"
  99. 1020 PRINT"[158]WRITTEN BY CARL LOCKMAN"
  100. 1030 PRINT"[158]      APRIL 1988    ":FORT=1TO2000:NEXT
  101. 1040 PRINTTAB(7)"                            "
  102. 1050 PRINTTAB(7)"      PRESS 'R' TO RUN      "
  103. 1055 PRINTTAB(7)"                            "
  104. 1060 FORT=1TO1500:NEXT
  105. 1070 PRINTTAB(7)"[145][145]  PRESS 'D' FOR DIRECTIONS":FORT=1TO1500:NEXT
  106. 1080 GETCH$:IFCH$=""THENPRINT"[145][145][145]":GOTO1040
  107. 1090 IFCH$="R"THEN90
  108. 1095 IFCH$="D"THEN1100
  109. 1100 PRINT"[147]":POKE53281,12:POKE53280,0
  110. 1110 PRINT"[144]       DIRECTIONS FOR CREATING "
  111. 1115 PRINT"          A CONVERSION CHART   "
  112. 1120 PRINT" 1- CHOOSE THE CONVERSION TABLE YOU WANT"
  113. 1121 PRINT"[145]    ENTER 1 - 12"
  114. 1125 PRINT" 2- ENTER THE RANGE OF THE CHART"
  115. 1130 PRINT" 3- ENTER THE INCREMENTS OF THE CHART"
  116. 1135 PRINT" 4- ENTER 'S' TO DISPLAY THE  CHART"
  117. 1140 PRINT"    ON THE SCREEN.           "
  118. 1142 PRINT"    ENTER 'P' TO PRINT OUT THE CHART   "
  119. 1145 PRINT" ** IF YOU CHOOSE TO HAVE THE CHART    "
  120. 1150 PRINT"    DISPLAYED ON THE SCREEN, IT MUST   "
  121. 1155 PRINT"    BE 19 LINES OR LESS.               "
  122. 1165 PRINT"    IF YOU WANT A PRINTOUT, THE CHART  "
  123. 1170 PRINT"    CAN BE AS LONG AS YOU WOULD LIKE."
  124. 1200 FORT=1TO1500:NEXT
  125. 1210 PRINT"          [153] PRESS 'R' TO RUN "
  126. 1215 FORT=1TO500:NEXT
  127. 1220 PRINT"          [153]                  "
  128. 1225 FORT=1TO500:NEXT
  129. 1230 GETRU$:IFRU$=""THEN1210
  130. 1240 IFRU$="R"THEN90
  131. 3000 Z=1/I:IF(T-A)*Z>19THEN3049
  132. 3010 GOTO516
  133. 3049 RR=0
  134. 3050 PRINT" CHART TO LARGE *** 19 LINES MAXIMUM "
  135. 3051 FORT=1TO750:NEXT
  136. 3055 PRINT"                                     "
  137. 3056 FORT=1TO500:NEXT
  138. 3060 RR=RR+1:IFRR=<3THEN3050
  139. 3070 GOTO500
  140. 3500 PRINT"[147]":POKE53281,6:POKE53280,14:POKE646,14:NEW:END
  141.