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