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)+.3)*200))\r | |
13 | REM puvodne bylo + .2 )*100\r | |
14 | \r | |
15 | FOR I=1 TO 15\r | |
16 | \r | |
17 | A(I)=INT(RND*V+1)\r | |
18 | A(I)=A(I)+1\r | |
19 | B(I)=INT(RND*V+1)\r | |
20 | B(I)=B(I)+1\r | |
21 | \r | |
22 | VYP:\r | |
6c1eebfd | 23 | REM pokud je A vetsi než 100 zmenšit\r |
0f95cc4b H |
24 | IF A(I)>=100 THEN A(I)=INT(A(I)*.9)+1: GOTO VYP\r |
25 | C(I)=A(I)+B(I)\r | |
6c1eebfd | 26 | REM pokud je součet větší než 100 zmenšit B\r |
0f95cc4b H |
27 | IF C(I)>100 THEN B(I)=INT(B(I)*.9)+1: GOTO VYP\r |
28 | \r | |
29 | LOCATE I+5,1\r | |
30 | PRINT " "\r | |
31 | LOCATE I+5,4\r | |
32 | PRINT "NAPIS VYSLEDEK" A(I) "+" B(I) "=":INPUT C\r | |
33 | \r | |
34 | IF C(I)=C THEN ANO\r | |
35 | \r | |
36 | LOCATE I+5,30\r | |
37 | PRINT C\r | |
38 | LOCATE I+5,34\r | |
39 | PRINT " SPATNY VYSLEDEK"\r | |
40 | SOUND 1200,2\r | |
41 | S=S+1\r | |
42 | GOTO VOLBA\r | |
43 | \r | |
44 | ANO:\r | |
45 | LOCATE I+5,30\r | |
46 | PRINT C\r | |
47 | LOCATE I+5,34\r | |
48 | PRINT " SPRAVNE"\r | |
49 | rem SOUND 600,2\r | |
50 | Z=Z+1\r | |
51 | \r | |
52 | VOLBA:\r | |
53 | NEXT I\r | |
54 | \r | |
55 | I=I-1\r | |
56 | PRINT "Z" I "POKUSU MAS" S "SPATNYCH A" Z "DOBRYCH"\r | |
57 | \r | |
58 | IF S=>4 THEN T=5\r | |
59 | IF S=3 THEN T=4\r | |
60 | IF S=2 THEN T=3\r | |
61 | IF S=1 THEN T=2\r | |
62 | IF S=0 THEN T=1\r | |
63 | print " "\r | |
64 | PRINT "VYSLEDNA ZNAMKA" T\r | |
65 | \r | |
66 | REM PRINT "POKUD CHCES POKRACOVAT ZMACKNI ENTER"\r | |
67 | REM LOCATE 21,10\r | |
68 | REM INPUT "POKUD CHCES SKONCIT NAPIS 1 A ZMACKNI 2 x ENTER";E\r | |
69 | REM IF E<>1 THEN OPET\r | |
70 | \r | |
71 | END\r | |
72 | \r | |
73 | \1a |