-



         

- 8


, , .. .

.

. 7.58. w1 = 10, w2 = 8 ( )

. 7.59. wl = 10, w2 = 10 ( )

153.

Program Bank;

Uses Graph, Crt;

Var Gm, Gd, P, X, Qq, I, T, V : Integer; St : String[1O];

Begin

Qq := 0; P := 6; V := 2; Randomize; DetectGraph(Gd, Gm);

InitGraph(Gd, Gm, ' ');

SetColor(2); RectAngle(300, 100, 500, 300);

:- 0;

Repeat

:= + 1; Str(T, St); SetTextStyle(0, 0, 1) ;

SetColor(4); OutTextXY(600, 50, St); X := Random(ll) ;

If X < P Then Qq := Qq + 1; SetColor(15) ;

For I := 0 To Qq Do Circle(490 - I * 30, 200, 15);

Delay(1000); SetColor(0);

For I := 0 To Qq Do Circle(490 - I * 30, 200, 15);

If T Mod V =

Then Begin

Qq := Qq - 1; If Qq < 0 Then Qq :- 0; Setcolor(15) ;

For I := 0 To Qq Do Circle(490 - I * 30, 200, 15);

End;

SetColor(O); OutTextXY(600, 50, St)

Until KeyPressed Or (Qq > 15); ReadLn;

End.