uses crt,graph; var x,y, z,drivervar,n, modevar:integer; c: string; label l; begin z:=0; drivervar:=detect; initgraph(Drivervar,modevar,''); l: n:=1; repeat begin cleardevice; setcolor(red); rectangle(100,250,500,300); setcolor(2); rectangle(100,150,200,200); rectangle(250,150,350,200); rectangle(400,150,500,200); setcolor(red); outtextxy(250,110,'2+2='); outtextxy(250,120,'Viberite pravilniy otvet'); settextstyle(2,0,6); outtextxy(145,175,'5'); outtextxy(295,175,'4'); outtextxy(445,175,'9'); if keypressed then c:=readkey; if c=#75 then if n = 1 then n:=3 else n:=n-1; if c=#77 then if n = 3 then n:=1 else n:=n+1; if n = 1 then begin setcolor(red); rectangle(100,150,200,200); if c=#13 then begin outtextxy(110,270,'otvet ne verniy'); c:=#27; end; end; if n = 2 then begin setcolor(red); rectangle(250,150,350,200); if c=#13 then begin outtextxy( 110,270,'pravilno'); z:=z+1; c:=#27; end; end; if n = 3 then begin setcolor(red); rectangle(400,150,500,200); if c=#13 then begin outtextxy( 110,270,'otvet ne verniy'); c:=#27; end; end; repeat until keypressed; end; until (c=#27); n:=1; c:='q'; repeat begin cleardevice; setcolor(red); rectangle(100,250,500,300); setcolor(2); rectangle(100,150,200,200); rectangle(250,150,350,200); rectangle(400,150,500,200); setcolor(red); outtextxy(250,110,'3+3x3'); outtextxy(250,120,'Viberite pravilniy otvet'); settextstyle(2,0,6); outtextxy(105,160,'11'); outtextxy(255,160,'12'); outtextxy(405,160,'13'); if keypressed then c:=readkey; if c=#75 then if n = 1 then n:=3 else n:=n-1; if c=#77 then if n = 3 then n:=1 else n:=n+1; if n = 1 then begin setcolor(red); rectangle(100,150,200,200); if c=#13 then begin outtextxy( 110,270,'pravilno'); z:=z+1; c:=#27; end; end; if n = 2 then begin setcolor(red); rectangle(250,150,350,200); if c=#13 then begin outtextxy( 110,270,'otvet ne verniy'); c:=#27; end; end; if n = 3 then begin setcolor(red); rectangle(400,150,500,200); if c=#13 then begin outtextxy( 110,270,'otvet ne verniy'); c:=#27; end; end; repeat until keypressed; end; until (c=#27); n:=1; c:='q'; repeat begin cleardevice; setcolor(red); rectangle(100,250,500,300); setcolor(2); rectangle(100,150,200,200); rectangle(250,150,350,200); rectangle(400,150,500,200); setcolor(red); outtextxy(250,110,'5+5='); outtextxy(250,120,'Viberite pravilniy otvet'); settextstyle(2,0,6); outtextxy(145,175,'5'); outtextxy(295,175,'10'); outtextxy(445,175,'9'); if keypressed then c:=readkey; if c=#75 then if n = 1 then n:=3 else n:=n-1; if c=#77 then if n = 3 then n:=1 else n:=n+1; if n = 1 then begin setcolor(red); rectangle(100,150,200,200); if c=#13 then begin outtextxy( 110,270,'otvet ne verniy'); c:=#27; end; end; if n = 2 then begin setcolor(red); rectangle(250,150,350,200); if c=#13 then begin outtextxy( 110,270,'pravilno'); z:=z+1; c:=#27; end; end; if n = 3 then begin setcolor(red); rectangle(400,150,500,200); if c=#13 then begin outtextxy( 110,270,'otvet ne verniy'); c:=#27; end; end; repeat until keypressed; end; until (c=#27); cleardevice; setcolor(red); rectangle(100,250,500,300); if z=1 then outtextxy( 110,270,'vy nabraly 1 bal'); if z=2 then outtextxy( 110,270,'vy nabraly 2 bal'); if z=3 then outtextxy( 110,270,'vy nabraly 3 bal'); readln end. closegraph; end.