home *** CD-ROM | disk | FTP | other *** search
/ C64 Fever 92 #1 / C64_Fever_92-01_1992_-_de.d64 / energiekosten (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  6KB  |  170 lines

  1. 12 poke53280,11:poke53281,11
  2. 14 print"[147]"
  3. 16 ku$="   copyright by kuschi soft                                      "
  4. 18 print   tab(4);:for i=1to len(ku$)
  5. 20 printmid$(ku$,i,1);:forj=1to50:next
  6. 22 next:print
  7. 24 fori=1to 900:next
  8. 26 gosub264
  9. 28 fori=1to2000:nexti
  10. 30 print"[147]":poke53280,11:poke53281,11
  11. 32 print"                                     [146]   ";
  12. 34 print"                                     [146]   ";
  13. 36 print"   [146]                                  [146]   ";
  14. 38 print"   [146]                                  [146]   ";
  15. 40 print"   [146]          [158] m e n u e [146]             [146]   ";
  16. 42 print"   [146]                                  [146]   ";
  17. 44 print"   [146]                                  [146]   ";
  18. 46 print"   [146]  s t r o m k o s t e n    [146] 1     [146]   ";
  19. 48 print"   [146]                                  [146]   ";
  20. 50 print"   [146]  g a s k o s t e n        [146] 2     [146]   ";
  21. 52 print"   [146]                                  [146]   ";
  22. 54 print"   [146]  w a s s e r k o s t e n  [146] 3     [146]   ";
  23. 56 print"   [146]                                  [146]   ";
  24. 58 print"   [146]  g e s a m m t k o s t e n[146] 4     [146]   ";
  25. 60 print"   [146]                                  [146]   ";
  26. 62 print"   [146]  g r a f i k              [146] 5     [146]   ";
  27. 64 print"   [146]                                  [146]   ";
  28. 66 print"   [146]  d r u c k e n            [146] 6     [146]   ";
  29. 68 print"   [146]                                  [146]   ";
  30. 70 print"   [146]  e n d e                  [146] 7     [146]   ";
  31. 72 print"   [146]                                  [146]   ";
  32. 74 print"   [146]                                  [146]   ";
  33. 76 print"                                     [146]   ";
  34. 78 print"                                     [146]  ";
  35. 80 geta$:ifval(a$)<1orval(a$)>8then80
  36. 82 ifa$="1"then98:rem stromkosten****
  37. 84 ifa$="2"then120:rem gaskosten******
  38. 86 ifa$="3"then142:rem wasserkosten***
  39. 88 ifa$="4"then162:rem gesammtkosten**
  40. 90 ifa$="5"then176:rem grafik********
  41. 92 ifa$="6"then322:rem drucken ******
  42. 94 ifa$="8"then30: rem menue**********
  43. 96 ifa$="7"then256:rem ende *********
  44. 98 rem:******** stromkosten ***********
  45. 100 rem:******** stromkosten ***********
  46. 102 print"[147]"
  47. 104 input"  [144]zaehlerstand [ alt ]:";z1:print
  48. 106 input"  [144]zaehlerstand [ neu ]:";z2:print
  49. 108 input"  [144]grundgebuehr :";gb:print
  50. 110 input"  [144]gebuehr pro kwh :";l:print
  51. 112 k=z2-z1:ifk>90000then262
  52. 114 sk=k*l+gb:ifgb>100then262
  53. 116 print"  kilowattstunden";k:print
  54. 118 print"  stromkosten";sk;"dm" :print:gosub172:goto80
  55. 120 rem:******* gasberechnung **********
  56. 122 print"[147]"
  57. 124 input"  [144]zaehlerstand [ alt ]:";z3:print
  58. 126 input"  [144]zaehlerstand [ neu ]:";z4:print
  59. 128 input"  [144]grundgebuehr :";gb2:print
  60. 130 input"  [144]gebuehr pro kbm :";l1:print
  61. 132 g=z4-z3:ifg>90000then262
  62. 134 print"  kubikmeter gas";g:print
  63. 136 gk=g*l1+gb2
  64. 138 print"  gaskosten" gk "dm":print:gosub172:goto80
  65. 140 return
  66. 142 rem:******* wasserberechnung *******
  67. 144 print"[147]"
  68. 146 input"  [144]zaehlerstand [ alt ]:";z5:print
  69. 148 input"  [144]zaehlerstand [ neu ]:";z6:print
  70. 150 input"  [144]grundgebuehr :";gb3:print
  71. 152 input"  [144]gebuehr pro kbm :";l2:print
  72. 154 w=z6-z5:ifw>90000then262
  73. 156 wk=w*l2+gb3:ifgb3>100 then262
  74. 158 print"  kubikmeter wasser [146]";w:print
  75. 160 print"  wasserkosten ";wk;"dm":print:gosub172:goto 80
  76. 162 rem:******** gesammtkosten *********
  77. 164 print"[147]"
  78. 166 gm=sk+gk+wk
  79. 168 ifgm>5000then262
  80. 170 print"gesammtkosten "gm;"dm":print:print:gosub172
  81. 172 print"[158]  druecke die 8  [146]":goto 80
  82. 174 return
  83. 176 rem:********** grafik ***************
  84. 178 print"[147]"
  85. 180 poke53280,0:poke53281,11
  86. 182 printchr$(30)chr$(147)
  87. 184 i=0:j=0:n=0:dx=0:dy=0:z=0:ma=0:dn$="":up$="":k$="":a$=""
  88. 186 fori=1to24:dn$=dn$+chr$(17):up$=up$+chr$(145):nexti
  89. 188 rem:****** eingabeteil ***********
  90. 190 n=3
  91. 192 ifsk=0 then260
  92. 194 fori=1ton
  93. 196 w$(1)="st"
  94. 198 w$(2)="ga"
  95. 200 w$(3)="wa"
  96. 202 w(1)=sk
  97. 204 w(2)=gk
  98. 206 w(3)=wk
  99. 208 ::ifabs(w(i))>ma then ma=w(i)
  100. 210 nexti
  101. 212 k$="         energiekosten "
  102. 214 rem:***** berechnungsteil ********
  103. 216 dx=ma/20:dy=int(7 )-1:rem:dx=ma/30
  104. 218 rem:** zeichenteil **
  105. 220 printdn$chr$(19):poke53281,0
  106. 222 fori=1to23
  107. 224 :printtab(2)chr$(98)
  108. 226 nexti
  109. 228 printchr$(19)k$
  110. 230 fori=1ton
  111. 232 :printleft$(dn$,dy);
  112. 234 :printw$(i);chr$(18)chr$(28)tab(3);
  113. 236 ::forj=1toint(w(i)/dx)
  114. 238 ::printchr$(32);
  115. 240 :nextj
  116. 242 :printchr$(146)chr$(30)tab(33)w(i)
  117. 244 nexti
  118. 246 poke2000,4:poke2001,18:poke2002,21:poke2003,5:poke2004,3:poke2005,11
  119. 248 poke2006,5:poke2009,56:poke56272,7:poke56273,7:poke56274,7:poke56275,7
  120. 250 poke56276,7:poke56277,7:poke56278,7:poke56281,7:goto80
  121. 252 goto30
  122. 254 rem:********* ende ****************
  123. 256 print"[147]"
  124. 258 printspc(170)"[153]auf wiedersehen ":print:print:fori=1to2000:next:end
  125. 260 print"[147]";spc(167)"ohne daten keine grafik!":fori=1to2000:next:goto30
  126. 262 printspc(122)"bitte ueberpruefen sie ihre eingabe!":fori=1to2000:next:goto30
  127. 264 poke53281,5:poke53280,5:poke53272,21:print"[147][144]";
  128. 266 print"          [146]     [146]     [146]     [146]     [146]  [146]     [146]
  129. 268 [153]"         wait     stop     wait     stop     stop  stop     stop wait
  130. 270 print"      [144] [146]    [144] [146]  [144]  [144] [146]    [144] [146]  [144]  [144] [146]    [144]  [144] [146]
  131. 272 [153]"      stop wait    stop wait  stop  stop wait    stop wait  stop  stop wait    stop  stop wait
  132. 274 print"      [144] [146]    [144] [146]  [144]  [144] [146]    [144]   [144]  [144]     [144]  [144] [146]
  133. 276 [153]"       stop wait   stop wait  stop   stop wait      stop     stop  stop   stop wait
  134. 278 print"      [144] [146]    [144] [146]  [144]  [144] [146]    [144]  [144] [146]  [144] [146]  [144]  [144]  [144] ";
  135. 280 print"[146]
  136. 282 [153]"      stop wait    stop wait  stop  stop wait    stop wait  stop  stop wait  stop  stop  stop ";
  137. 284 [153]"wait
  138. 286 print"      [144]     [144] [146]  [144]  [144]     [144] [146]  [144]  [144]   [144]  [144]  [144]    [146]
  139. 288 [153]"         stop  stop wait  stop     stop  stop wait  stop     stop  stop     stop wait
  140. 290 print"    [158] [146]   [146]     [146]      [146]       [146]     [146]      [146]
  141. 292 [153]"    sys wait  sys wait    sys wait     sys wait      wait     sys wait     sys wait
  142. 294 print"    [158]  [158] [146]   [158]  [158] [146]   [158]  [158] [146]    [158] [146]    [158] [146]    [158] [146] ";
  143. 296 print" [158] [146]
  144. 298 [153]"     sys wait    sys  sys wait   sys wait      sys wait    sys wait    sys wait  sys";
  145. 300 [153]" wait
  146. 302 print"     [158] [146]    [158]  [158] [146]    [158] [146]     [158] [146]     [158] [146]   [158] [146]  [158]";
  147. 304 print" [146]
  148. 306 [153]"    sys  sys wait   sys  sys wait     sys wait    sys wait    sys wait    sys wait ";
  149. 308 [153]" sys wait
  150. 310 print"    [158] [146]  [158] [146]  [158]  [158] [146]   [158]  [158] [146]    [158] [146]    [158]   [146]  [158] ";
  151. 312 print"[146]  [158] [146]
  152. 314 [153]"    sys wait  sys wait    sys wait     sys wait    sys wait      sys wait  sys wait ";
  153. 316 [153]" sys wait
  154. 318 print"        b e r e c h n u n g e n  [146]
  155. 320 [142]
  156. 322 [143]:******druckerausgabe******
  157. 324 [159]1,4:[143] open 1,16 mit soft centronics
  158. 326 [152]1,[199](14)"jahreskosten"[199](15)
  159. 328 [152]1,"--------------------------------------------------"
  160. 330 [152]1,"es wurden";k;"kwh strom  verbraucht =";sk;"dm, kosten"
  161. 332 [152]1,"--------------------------------------------------"
  162. 334 [152]1,"es wurden";g;"kbm gas    verbraucht =";gk;"dm, kosten"
  163. 336 [152]1,"--------------------------------------------------"
  164. 338 [152]1,"es wurden";w;"kbm wasser verbraucht =";wk;"dm, kosten"
  165. 340 [152]1,"--------------------------------------------------"
  166. 342 gm[178]sk[170]gk[170]wk
  167. 344 [152]1,"die gesammtkosten betragen";gm;"dm"
  168. 346 [152]1,"--------------------------------------------------"
  169. 348 [160]1,4 :[137]12
  170.