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