Commit | Line | Data |
---|---|---|
0f95cc4b H |
1 | GOTO POKR\r |
2 | \r | |
3 | \r | |
4 | \r | |
5 | POKR :\r | |
6 | SCREEN 8 : CLS\r | |
7 | COLOR 14,1\r | |
8 | RESTORE BARVY\r | |
9 | BARVY :\r | |
10 | \r | |
11 | DATA 8,7,15,15,7,8\r | |
12 | FOR A=1 TO 6\r | |
13 | READ C\r | |
14 | LINE (A,A)-(640-A,A),C\r | |
15 | LINE (A,106-A)-(640-A,106-A),C\r | |
16 | LINE (A,A)-(A,106-A),C\r | |
17 | LINE (640-A,A)-(640-A,106-A),C\r | |
18 | LINE (A,110+A)-(640-A,110+A),C\r | |
19 | LINE (A,200-A)-(640-A,200-A),C\r | |
20 | LINE (A,110+A)-(A,200-A),C\r | |
21 | LINE (640-A,110+A)-(640-A,200-A),C\r | |
22 | NEXT A\r | |
23 | \r | |
24 | REM zadani polozek adresare\r | |
25 | DO\r | |
26 | A$="NASOB HELP POZDR NASO2 KONEC "\r | |
27 | D=5:X=5:Y=17:C=14\r | |
28 | GOSUB MENU\r | |
29 | ON MENU GOSUB NASOB,TEXT,NIC1,NASOB2,KONEC\r | |
30 | LOOP\r | |
31 | \r | |
32 | '-----------------------------------------------------------------------------\r | |
33 | TEXT :\r | |
34 | LOCATE 10,5\r | |
6c1eebfd | 35 | print "JESTLI ŽE NEUMÍTE NASOBIT:*KONEC*,!!!POZOR!!! NASOB2 ZNAMKUJE"\r |
0f95cc4b H |
36 | RETURN\r |
37 | '-----------------------------------------------------------------------------\r | |
38 | NASOB :\r | |
39 | SCREEN 0\r | |
40 | CLS\r | |
41 | \r | |
42 | COLOR 14,1\r | |
43 | N=0\r | |
44 | S=0\r | |
45 | V=0\r | |
46 | \r | |
47 | OPET:\r | |
48 | N=N+1\r | |
49 | CLS\r | |
50 | LOCATE 4,23\r | |
51 | PRINT "PROGRAM PRO ZKOUSENI MALE NASOBILKY"\r | |
52 | A=INT(RND(5)*10+1)\r | |
53 | B=INT(RND(4)*10+1)\r | |
54 | LOCATE 10,5\r | |
55 | PRINT "NAPIS VYSLEDEK" A "x" B "="\r | |
56 | INPUT " STISKNI ENTER";C\r | |
57 | D=A*B\r | |
58 | IF D=C THEN ANO\r | |
59 | SOUND RND*10000+90,90\r | |
60 | PRINT " SPATNY VYSLEDEK"\r | |
61 | \r | |
62 | S=S+1\r | |
63 | GOTO VOLBA\r | |
64 | \r | |
65 | ANO:\r | |
66 | SOUND RND*100+90,90\r | |
67 | PRINT " SPRAVNE"\r | |
68 | V=V+1\r | |
69 | VOLBA:\r | |
70 | LOCATE 18,10\r | |
71 | \r | |
72 | PRINT "Z" N "POKUSU MAS" S "SPATNYCH A" V "DOBRYCH"\r | |
73 | LOCATE 20,10\r | |
74 | PRINT "POKUD CHCES POKRACOVAT ZMACKNI ENTER"\r | |
75 | LOCATE 21,10\r | |
76 | INPUT "POKUD CHCES SKONCIT NAPIS 1 A ZMACKNI 2 x ENTER";E\r | |
77 | IF E<>1 THEN OPET\r | |
78 | REM pise chybu sound rnd*100+12,13\r | |
79 | RETURN\r | |
80 | '-----------------------------------------------------------------------------\r | |
81 | KONEC :\r | |
82 | print "stlac klavesu Enter"\r | |
83 | end\r | |
84 | '-----------------------------------------------------------------------------\r | |
85 | NIC1 :\r | |
86 | A$="Zdravi Vas Tomas Mudrunka"\r | |
87 | CALL ECHO (5,16,A$,13)\r | |
88 | A$="Jak se mate?"\r | |
89 | CALL ECHO (7,17,A$,13)\r | |
90 | A$="Jak se Vam libi tento program?"\r | |
91 | CALL ECHO (7,18,A$,13)\r | |
92 | \r | |
93 | CALL ANYKEY\r | |
94 | CALL CLWD\r | |
95 | RETURN\r | |
96 | '-----------------------------------------------------------------------------\r | |
97 | NASOB2 :\r | |
98 | \r | |
99 | SCREEN 0\r | |
100 | CLS\r | |
101 | COLOR 4,15\r | |
102 | S=0\r | |
103 | V=0\r | |
104 | \r | |
105 | \r | |
106 | FOR I=1 TO 10\r | |
107 | rem nechat pokud nebude vadit CLS\r | |
108 | LOCATE 4,20\r | |
109 | PRINT "PROGRAM PRO ZKOUSENI MALE NASOBILKY - 10 PRIKLADU"\r | |
110 | \r | |
111 | A=INT(RND(5)*10+1)\r | |
112 | B=INT(RND(4)*10+1)\r | |
113 | LOCATE 10,5\r | |
114 | REM vymaze radek\r | |
115 | PRINT " "\r | |
116 | PRINT " "\r | |
117 | LOCATE 10,5\r | |
118 | PRINT "NAPIS VYSLEDEK" A "x" B "="\r | |
119 | INPUT " STISKNI ENTER";C\r | |
120 | D=A*B\r | |
121 | \r | |
122 | IF D=C THEN ANO2\r | |
123 | SOUND RND*10000+55,55\r | |
124 | PRINT " SPATNY VYSLEDEK"\r | |
125 | \r | |
126 | S=S+1\r | |
127 | GOTO VOLBA2\r | |
128 | \r | |
129 | ANO2:\r | |
130 | SOUND RND*100+55,55\r | |
131 | PRINT " SPRAVNE"\r | |
132 | V=V+1\r | |
133 | VOLBA2:\r | |
134 | LOCATE 18,10\r | |
135 | PRINT "Z" I "POKUSU MAS" S "SPATNYCH A" V "DOBRYCH"\r | |
136 | REM zdrzeni programu\r | |
137 | FOR G=1 TO 10\r | |
138 | \r | |
139 | NEXT G\r | |
140 | NEXT I\r | |
141 | \r | |
142 | LOCATE 18,10\r | |
143 | PRINT "Z" S+V "POKUSU MAS" S "SPATNYCH A" V "DOBRYCH"\r | |
144 | \r | |
145 | IF S=>4 THEN T=5\r | |
146 | IF S=3 THEN T=4\r | |
147 | IF S=2 THEN T=3\r | |
148 | IF S=1 THEN T=2\r | |
149 | IF S=0 THEN T=1\r | |
150 | LOCATE 20,10\r | |
151 | PRINT "VYSLEDNA ZNAMKA" T\r | |
152 | \r | |
153 | Input "Ukonci stiskem klavesy ENTER";A\r | |
154 | RETURN\r | |
155 | '-----------------------------------------------------------------------------\r | |
156 | \r | |
157 | \r | |
158 | END\r | |
159 | '-----------------------------------------------------------------------------\r | |
160 | ' podprogram ECHO\r | |
161 | ' postupny tisk textu obsazeneho v retezcove promenne A$\r | |
162 | ' na souradnice X a Y\r | |
163 | ' barvou C\r | |
164 | \r | |
165 | SUB ECHO(X,Y,A$,C)\r | |
166 | COLOR C\r | |
167 | LOCATE Y,X\r | |
168 | FOR A=1 TO LEN(A$)\r | |
169 | PRINT MID$ (A$,A,1);\r | |
170 | SOUND 1200,.2\r | |
171 | SOUND 900,.2\r | |
172 | SOUND 600,.2\r | |
173 | FOR I=1 TO 200\r | |
174 | NEXT I\r | |
175 | NEXT A\r | |
176 | END SUB\r | |
177 | \r | |
178 | '--------------------------------------------------------------------------\r | |
179 | \r | |
180 | MENU :\r | |
181 | ' PODPROGRAM 'MENU'\r | |
182 | \r | |
183 | ' X a Y jsou textove souradnice menu-okna\r | |
184 | ' A$ obsahuje text okna\r | |
185 | ' D je pocet polozek (radku) v menu\r | |
186 | ' W=1 - pouze vypis okna , W=0 - vypis i vyber z menu\r | |
187 | ' C je barva okna\r | |
188 | ' v promenne MENU podprogram vraci cislo zvolene polozky\r | |
189 | \r | |
190 | L=LEN (A$)/D : MENU = 1 : M = MENU+.0001\r | |
191 | COLOR C,9:LOCATE Y,X\r | |
192 | PRINT CHR$(201);\r | |
193 | FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r | |
194 | PRINT CHR$ (187);\r | |
195 | FOR A= 1 TO LEN(A$) STEP L\r | |
196 | LOCATE Y+A/L+1,X\r | |
197 | PRINT CHR$(186);" ";MID$(A$,A,L);" ";CHR$(186);\r | |
198 | NEXT A\r | |
199 | LOCATE Y+A/L+1,X: PRINT CHR$(200);\r | |
200 | FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r | |
201 | PRINT CHR$(188);\r | |
202 | IF W=1 THEN W=0 : RETURN\r | |
203 | \r | |
204 | DO\r | |
205 | I$ = INKEY$\r | |
206 | IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=72 THEN MENU = MENU - 1\r | |
207 | IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=80 THEN MENU = MENU + 1\r | |
208 | IF MENU < 1 THEN MENU = D\r | |
209 | IF LEN(I$)=1 THEN IF ASC(I$)=13 THEN EXIT LOOP\r | |
210 | IF MENU > D THEN MENU = 0 : EXIT LOOP \r | |
211 | IF MENU <> M THEN LOCATE Y+M,X+L+2 : PRINT " ";:LOCATE Y+M,X+1 : PRINT " ";\r | |
212 | IF MENU <> M THEN LOCATE Y+MENU,X+L+2:COLOR 11:PRINT CHR$(174);:LOCATE Y+MENU,X+1:PRINT CHR$(175);:COLOR C\r | |
213 | M = MENU\r | |
214 | LOOP\r | |
215 | I=MENU\r | |
216 | W=1:C=0:GOSUB MENU\r | |
217 | MENU = I : COLOR 15\r | |
218 | RETURN\r | |
219 | '-----------------------------------------------------------------------------\r | |
220 | SUB CLWD\r | |
221 | 'Clear window\r | |
222 | FOR A=120 TO 190\r | |
223 | LINE (8,A)-(632,A),0\r | |
224 | NEXT A\r | |
225 | END SUB\r | |
226 | '-----------------------------------------------------------------------------\r | |
227 | SUB ANYKEY\r | |
228 | DO\r | |
229 | IF INKEY$<>"" THEN EXIT LOOP\r | |
230 | C=C+1:IF C>15 THEN C=1\r | |
231 | COLOR C : LOCATE 24,55:PRINT "STLAC LIBOVOLNOU KLAVESU";\r | |
232 | LOOP\r | |
233 | END SUB\r | |
234 | '-----------------------------------------------------------------------------\r | |
235 | \r | |
236 | \1a |