Exclusive mode seems to work without deadlocks
[mirrors/Programs.git] / turbobasic / 1998 / 3RD-PA.RTY / DEK.BAS
... / ...
CommitLineData
1SCREEN 0\r
2COLOR 0,15\r
3GOTO pet\r
4\r
5pet:\r
6CLS\r
7LOCATE 10,5\r
8input "NORMA SPOTREBY = 8.2 => Enter; NEBO ZAPIS JINOU";S1\r
9IF S1=0 THEN S1= 8.2\r
10CLS\r
11LOCATE 10,5\r
12INPUT "POCET UJETYCH km OD ZACATKU MESICE";K\r
13CLS\r
14LOCATE 10,5\r
15INPUT "STAV BENZINU - BLOKY NA ZAC. DEKADY";B\r
16CLS\r
17LOCATE 10,5\r
18INPUT "STAV BENZINU - NADRZ NA ZAC. DEKADY";B4\r
19CLS\r
20LOCATE 10,5\r
21INPUT "CERPANE BLOKY OD ZAC. MESICE - SL.9";B1\r
22CLS\r
23LOCATE 10,5\r
24INPUT "STAV TACHOMETRU NA ZAC. DEKADY";O\r
25CLS\r
26PRINT SPC(32) "DEKADA"\r
27PRINT "==============================================================================="\r
28PRINT " SLOUPEC 6 ! SLOUPEC 7 ! SLOUPEC 9 ! BENZIN "\r
29PRINT " TACH.KONEC DNE ! KmDen KmCelk! ZAC DOPL CELK ! BLOKY NADRZ "\r
30PRINT "================================================================================"\r
31R=8:K2=0:B6=0\r
32FOR I =1 TO 9: R=R+1\r
33LOCATE 20,1\r
34PRINT\r
35LOCATE 20,1\r
36INPUT "UDEJ POCET UJETYCH km ZA DEN";K1\r
37IF K1=0 THEN konec\r
38K=K1+K:B5=B1+B5:A=(K1/100)*S1:A1=A-INT(A)\r
39IF A1< = .7 THEN raz\r
40IF A1> .7 THEN dva\r
41\r
42raz:\r
43B3=INT(A)\r
44GOTO tri\r
45\r
46dva:\r
47B3=INT(A)+1\r
48GOTO tri\r
49\r
50tri:\r
51LOCATE 20,1:PRINT" "\r
52LOCATE 20,1\r
53PRINT"SPOTREBA/NADRZ:";B3;"/";B4;"=>DOPLNENI NADRZE?":INPUT B2\r
54LOCATE 20,1:PRINT " "\r
55LOCATE 21,1:PRINT " "\r
56B4=B4-B3+B2:B=B-B2:B5=B1+B2\r
57O2=O+K1\r
58LOCATE R-2,9:PRINT O2\r
59LOCATE R-2,22:PRINT K1\r
60LOCATE R-2,30:PRINT K\r
61LOCATE R-2,39:PRINT B1\r
62LOCATE R-2,44:PRINT B2\r
63LOCATE R-2,49:PRINT B5\r
64LOCATE R-2,70:PRINT B4\r
65LOCATE R-2,62:PRINT B\r
66LOCATE R-2,20:PRINT "!"\r
67LOCATE R-2,36:PRINT "!"\r
68LOCATE R-2,58:PRINT "!"\r
69O=O2\r
70B1=B1+B2:K2=K2+K1:B6=B6+B3\r
71NEXT\r
72GOTO konec\r
73\r
74konec:\r
75S=S1*(K2/100)\r
76LOCATE 20,1:PRINT " NORMOVANA SPOTREBA:";S;" "\r
77\r
78LOCATE 20,30:PRINT" "\r
79\r
80LOCATE 21,2:PRINT"SKUTECNA SPOTREBA:";B6;" "\r
81LOCATE 22,2:PRINT"UJETE km V DEKADE:";K2;" "\r
82LOCATE 24,15\r
83INPUT "KONEC = Enter ; OPAKOVANI = 1 ";A\r
84IF A=1 GOTO pet\r
85 END\1a
This page took 0.313594 seconds and 4 git commands to generate.