uses crt; var i,kohvik,loend:integer; a,y,b,c,d,e,f,g,h,j,k,l,m,n,o,p,v,u,z,x,i1:integer; turist:integer; pro:real; vas:string; label tagasi; label 1; begin clrscr; randomize; kohvik:=0; loend:=0; a:=random(2); turist:=random(101); for i:=1 to turist do begin tagasi: if a=0 then begin k :=random(3); a:=4; goto tagasi;end; if a=1 then begin n :=random(3); a:=5; goto tagasi; end; if n=2 then begin v :=random(3); n:=5; goto tagasi; end; if n=0 then begin m :=random(4); n:=6; goto tagasi; end; if n=1 then begin a :=random(2); n:=7; goto tagasi; end; if k=0 then begin a :=random(2); k:=5; goto tagasi; end; if k=2 then begin m :=random(4); k:=5; goto tagasi; end; if k=1 then begin u :=random(3); k:=6; goto tagasi; end; if u=2 then begin l :=random(4); u:=5; goto tagasi; end; if u=0 then begin y :=random(3); u:=6; goto tagasi; end; if u=1 then begin k :=random(3); u:=7; goto tagasi; end; if y=0 then begin u :=random(3); y:=5; goto tagasi; end; if y=1 then begin z :=random(2); y:=6; goto tagasi; end; if y=2 then begin x :=random(4); y:=7; goto tagasi; end; if z=1 then begin y :=random(3); z:=6; goto tagasi; end; if z=0 then begin i1 :=random(3); z:=7; goto tagasi; end; if i1=0 then begin z :=random(2); i1:=6; goto tagasi; end; if i1=1 then begin x :=random(4); i1:=7; goto tagasi; end; if i1=2 then begin j :=random(3); i1:=8; goto tagasi; end; if x=0 then begin l :=random(4); x:=6; goto tagasi; end; if x=1 then begin i1 :=random(3); x:=7; goto tagasi; end; if x=2 then begin y :=random(3); x:=9; goto tagasi; end; if x=3 then begin c :=random(4); x:=8; goto tagasi; end; if l=0 then begin x :=random(4); l:=6; goto tagasi; end; if l=1 then begin m :=random(4); l:=7; goto tagasi; end; if l=2 then begin u :=random(4); l:=8; goto tagasi; end; if l=3 then begin o :=random(4); l:=9; goto tagasi; end; if m=0 then begin n :=random(3); m:=6; goto tagasi; end; if m=1 then begin l :=random(4); m:=7; goto tagasi; end; if m=2 then begin k :=random(3); m:=8; goto tagasi; end; if m=3 then begin b :=random(4); m:=9; goto tagasi; end; if j=0 then begin d :=random(2); j:=6; goto tagasi; end; if j=1 then begin c :=random(4); j:=7; goto tagasi; end; if j=2 then begin i1 :=random(3); j:=8; goto tagasi; end; if c=0 then begin o :=random(4); c:=6; goto tagasi; end; if c=1 then begin j :=random(3); c:=7; goto tagasi; end; if c=2 then begin e :=random(3); c:=8; goto tagasi; end; if c=3 then begin x :=random(4); c:=9; goto tagasi; end; if o=0 then begin c :=random(4); o:=6; goto tagasi; end; if o=1 then begin b :=random(4); o:=7; goto tagasi; end; if o=2 then begin f :=random(3); o:=8; goto tagasi; end; if o=3 then begin l :=random(4); o:=9; goto tagasi; end; if b=0 then begin v :=random(3); b:=6; goto tagasi; end; if b=1 then begin o :=random(4); b:=7; goto tagasi; end; if b=2 then begin g :=random(3); b:=8; goto tagasi; end; if b=3 then begin m :=random(4); b:=9; goto tagasi; end; if v=0 then begin b :=random(4); v:=6; goto tagasi; end; if v=1 then begin h :=random(2); v:=7; goto tagasi; end; if v=2 then begin n :=random(3); v:=8; goto tagasi; end; if d=0 then begin j :=random(3); d:=6; goto tagasi; end; if d=1 then begin e :=random(3); d:=7; goto tagasi; end; if e=0 then begin f :=random(3); e:=6; goto tagasi; end; if e=1 then begin d :=random(2); e:=7; goto tagasi; end; if e=2 then begin c :=random(4); e:=8; goto tagasi; end; if f=0 then begin e :=random(3); f:=6; goto tagasi; end; if f=1 then begin g :=random(3); f:=7; goto tagasi; end; if f=2 then begin o :=random(4); f:=8; goto tagasi; end; if g=0 then begin h :=random(2); g:=6; goto tagasi; end; if g=1 then begin f :=random(3); g:=7; goto tagasi; end; if g=2 then begin b :=random(4); g:=8; goto tagasi; end; if h=0 then begin g :=random(3); h:=6; goto tagasi; end; if h=1 then begin v :=random(3); h:=7; goto tagasi; end; if (c=0) or (f=2) or(b=1) or(l=3) then kohvik:=kohvik+1; if a=2 then goto 1; if kohvik =2 then loend:=loend+1; if (vana<>uus) then goto tagasi; end; pro:=loend*100/turist; writeln(turist,'-st liikmest koosnev turismigrupp astus sisse kaubanduskeskusse'); 1:writeln('Sellest grupist ',pro:2:0,'% turistidest moodusid kaks korda kohvikust, mis paiknes keset kaubanduskeskust '); readln; end.