program igra; uses graph,crt; const NC:array[0..15] of String [12]= ('Black', ' Blue',' Green',' Cyan ', 'Red',' Magenta',' Brown','LightGray','DarkGray','LightBlue','LightGreen', 'LightCyan','LightRed','LightMagenta','Yellow','White'); F:array[1..12] of Real= (130,8,138.6,146.8,155.6,164.8,174.6, 185.0,196.0,207.7,220.0,233.1); Temp=100; var d,r,e,k,color,dx,dy,n,l,mistake,z:integer; begin {clrscr;setColor(9); outtextxy(10,40,'Tere tulemast psuhholoogilisse.See on v„ga huvitav,'); outtextxy(10,60,'ja siin on palju informatsiooni sinu jaoks!'); rectangle(5,25,460,80); writeln('Vali, palun, sinu lemmik v„rv ja kirjuta '); writeln(' seda muusika ja piltidest p„rast!'); readln(color);} d:=detect; initGraph(d,r,''); e:=GraphResult; if e<>grOK then Writeln(GraphErrorMsg(e)) else begin OutTextXY(200,GetMaxY div 2,'BACKGROUND COLOR'); dx:=GetMaxX div 30; dy:=GetMaxY div 30; for k:=0 to 9 do Rectangle(k*dx,k*dy,GetMaxX-k*dx,GetMaxY-k*dy); color:=black; repeat SetBkColor(color); SetFillStyle(0,Color); Bar(345,GetMaxY div 2,440, GetMaxY div 2+8); OutTextXY(345,GetMaxY div 2,NC[color]); delay(1000); inc(color); if color > White then color:=Black until KeyPressed; if ReadKey=#0 then k:=ord(ReadKey); CloseGraph end; {case color of Black:z:= You are bad; Blue:z:= 'You have original charity'; Green:= Cyan:= Red:= Magenta:= Brown:= LightGray:= DarkGray:= LightBlue:= LightGreen:= LightCyan:= LightRed:= LightMagenta:= Yellow:= White:= else mistake:='Alga,palun,veelkord alates!'; end; if not mistake then Writeln(' ',z) } begin for l:=0 to 3 do for n:=1 to 12 do begin Sound(Round(F[n]*(1 shl l))); Delay(Temp); NoSound end; for k:=3 downto 0 do for n:=12 downto 1 do begin Sound(Round(F[n]*(1 shl l))); Delay(Temp); NoSound end; end; end.