Added experimental makepkg-update-checksums.sh
[mirrors/Programs.git] / turbobasic / 1998 / SCITANI2.BAS
CommitLineData
0f95cc4b
H
1SCREEN 0\r
2CLS\r
3COLOR 4,15\r
4S=0\r
5Z=0\r
6\r
7LOCATE 4,23\r
8PRINT "PROGRAM PRO ZKOUSENI SCITANI"\r
9PRINT " "\r
10\r
11V=TIMER\r
12V=INT(((V-INT(V)+.3)*200))\r
13REM puvodne bylo + .2 )*100\r
14\r
15FOR I=1 TO 15\r
16\r
17A(I)=INT(RND*V+1)\r
18A(I)=A(I)+1\r
19B(I)=INT(RND*V+1)\r
20B(I)=B(I)+1\r
21\r
22VYP:\r
6c1eebfd 23REM pokud je A vetsi než 100 zmenšit\r
0f95cc4b
H
24IF A(I)>=100 THEN A(I)=INT(A(I)*.9)+1: GOTO VYP\r
25C(I)=A(I)+B(I)\r
6c1eebfd 26REM pokud je součet větší než 100 zmenšit B\r
0f95cc4b
H
27IF C(I)>100 THEN B(I)=INT(B(I)*.9)+1: GOTO VYP\r
28\r
29LOCATE I+5,1\r
30PRINT " "\r
31LOCATE I+5,4\r
32PRINT "NAPIS VYSLEDEK" A(I) "+" B(I) "=":INPUT C\r
33\r
34IF C(I)=C THEN ANO\r
35\r
36LOCATE I+5,30\r
37PRINT C\r
38LOCATE I+5,34\r
39PRINT " SPATNY VYSLEDEK"\r
40SOUND 1200,2\r
41S=S+1\r
42GOTO VOLBA\r
43\r
44ANO:\r
45LOCATE I+5,30\r
46PRINT C\r
47LOCATE I+5,34\r
48PRINT " SPRAVNE"\r
49rem SOUND 600,2\r
50Z=Z+1\r
51\r
52VOLBA:\r
53NEXT I\r
54\r
55I=I-1\r
56PRINT "Z" I "POKUSU MAS" S "SPATNYCH A" Z "DOBRYCH"\r
57\r
58IF S=>4 THEN T=5\r
59IF S=3 THEN T=4\r
60IF S=2 THEN T=3\r
61IF S=1 THEN T=2\r
62IF S=0 THEN T=1\r
63print " "\r
64PRINT "VYSLEDNA ZNAMKA" T\r
65\r
66REM PRINT "POKUD CHCES POKRACOVAT ZMACKNI ENTER"\r
67REM LOCATE 21,10\r
68REM INPUT "POKUD CHCES SKONCIT NAPIS 1 A ZMACKNI 2 x ENTER";E\r
69REM IF E<>1 THEN OPET\r
70\r
71END\r
72\r
73\1a
This page took 0.177036 seconds and 4 git commands to generate.