uses CRT; var c,c1:char; k:byte; a1,b1,s,z:real; procedure vv(a,b,c:byte); begin textbackground(1); clrscr; window(20,2,40,7); textbackground(a); clrscr; gotoxy(5,3); write('VVedite zadachy'); window(20,9,40,14); textbackground(b); clrscr; gotoxy(5,3); write('Reshenie'); window(20,16,40,21); textbackground©; clrscr; gotoxy(5,3); write('Vyhod'); end; procedure pr1(var x,y:real); begin textbackground(1); clrscr; window(10,10,70,20); textbackground(6); clrscr; gotoxy(7,3); writeln('vvedite nomer'); readln(z); if z<>13 then halt; textbackground(1); clrscr; window(10,10,70,20); textbackground(6); clrscr; gotoxy(7,6); write('Vedite x '); readln(a1); gotoxy(7,8); write('Vedite y '); readln(b1); vv(5,4,4); end; procedure pr2(x,y:real; var s:real); begin textbackground(1); clrscr; window(10,10,70,20); textbackground(6); clrscr; gotoxy(25,5); if (abs(x)>1) and (abs(y)>1) and (sqr(x)+sqr(y)<=4) then writeln('Prinadlegit') else writeln('Ne prinadlegit') end; begin vv(5,4,4); k:=1; repeat c:=readkey; if (k=3) and (c=#13) then halt else if (k=1) and (c=#13) then begin window(1,1,80,25); textbackground(1); clrscr; pr1(a1,b1); if c=#13 then begin k:=1; end; end else if (k=2) and (c=#13) then begin window(1,1,80,25); textbackground(1); clrscr; pr2(a1,b1,s); c:=readkey; if c=#13 then begin k:=2;vv(4,5,4) end end else if c=#0 then begin c1:=readkey; case ord(c1) of 72:begin case k of 1:begin vv(4,4,5); k:=3; end; 2:begin vv(5,4,4); k:=1; end; 3:begin vv(4,5,4); k:=2; end; end; end; 80:begin case k of 1:begin vv(4,5,4); k:=2 end; 2:begin vv(4,4,5); k:=3 end; 3:begin vv(5,4,4); k:=1;end; end; end; end; end; until c=#27; end.