Commit | Line | Data |
---|---|---|
0f95cc4b H |
1 | SCREEN 0\r |
2 | CLS\r | |
3 | COLOR 4,15\r | |
4 | S=0\r | |
5 | Z=0\r | |
6 | \r | |
7 | LOCATE 4,23\r | |
8 | PRINT "PROGRAM PRO ZKOUSENI SCITANI"\r | |
9 | PRINT " "\r | |
10 | \r | |
11 | V=TIMER\r | |
12 | V=INT(((V-INT(V)+.2)*100))\r | |
13 | \r | |
14 | FOR I=1 TO 15\r | |
15 | \r | |
16 | A(I)=INT(RND*V+1)\r | |
17 | A(I)=A(I)+1\r | |
18 | B(I)=INT(RND*V+1)\r | |
19 | B(I)=B(I)+1\r | |
20 | \r | |
21 | VYP:\r | |
22 | IF A(I)>=B(I) THEN C(I)=A(I)-B(I):D(I)=B(I):GOTO VYSL\r | |
6c1eebfd | 23 | REM pokud je B větší než A zmenší se\r |
0f95cc4b H |
24 | B(I)=INT(B(I)*.9)\r |
25 | B(I)=B(I)+1\r | |
26 | GOTO VYP\r | |
27 | \r | |
28 | VYSL:\r | |
6c1eebfd | 29 | REM aby druhý sčítanec nebyl 0\r |
0f95cc4b H |
30 | IF C(I)=O THEN A(I)=A(I)+2:GOTO VYP\r |
31 | \r | |
32 | REM VYSLEDEK JE V A(x)\r | |
33 | LOCATE I+5,1\r | |
34 | PRINT " "\r | |
35 | LOCATE I+5,4\r | |
36 | PRINT "NAPIS VYSLEDEK" D(I) "+" C(I) "=":INPUT C\r | |
37 | \r | |
38 | IF A(I)=C THEN ANO\r | |
39 | \r | |
40 | LOCATE I+5,30\r | |
41 | PRINT C\r | |
42 | LOCATE I+5,34\r | |
43 | PRINT " SPATNY VYSLEDEK"\r | |
44 | SOUND 1200,2\r | |
45 | S=S+1\r | |
46 | GOTO VOLBA\r | |
47 | \r | |
48 | ANO:\r | |
49 | LOCATE I+5,30\r | |
50 | PRINT C\r | |
51 | LOCATE I+5,34\r | |
52 | PRINT " SPRAVNE"\r | |
53 | rem SOUND 600,2\r | |
54 | Z=Z+1\r | |
55 | \r | |
56 | VOLBA:\r | |
57 | NEXT I\r | |
58 | \r | |
59 | I=I-1\r | |
60 | PRINT "Z" I "POKUSU MAS" S "SPATNYCH A" Z "DOBRYCH"\r | |
61 | \r | |
62 | IF S=>4 THEN T=5\r | |
63 | IF S=3 THEN T=4\r | |
64 | IF S=2 THEN T=3\r | |
65 | IF S=1 THEN T=2\r | |
66 | IF S=0 THEN T=1\r | |
67 | print " "\r | |
68 | PRINT "VYSLEDNA ZNAMKA" T\r | |
69 | \r | |
70 | REM PRINT "POKUD CHCES POKRACOVAT ZMACKNI ENTER"\r | |
71 | REM LOCATE 21,10\r | |
72 | REM INPUT "POKUD CHCES SKONCIT NAPIS 1 A ZMACKNI 2 x ENTER";E\r | |
73 | REM IF E<>1 THEN OPET\r | |
74 | \r | |
75 | END\r | |
76 | \r | |
77 | \1a |