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