uses graph; type mas=array[1..10]of real; label graf; var reiz:real; d,m:integer; q:integer; alfa,beta:mas; x,y:mas; i,j,n:integer; begin writeln('Ievadi virsotnju skaitu!'); while n<3 do begin write(' ? n='); readln(n); end; for i:=1 to n do begin write(' ? x[',i,']='); readln(x[i]); write(' ? y[',i,']='); readln(y[i]); end; x[n+1]:=x[1]; y[n+1]:=y[1]; for i:=1 to n do begin if x[i+1]-x[i]=0 then if y[i+1]-y[i]>0 then alfa[i]:=pi/2 else alfa[i]:=-pi/2 else alfa[i]:=arctan((y[i+1]-y[i])/(x[i+1]-x[i])); if x[i+1]-x[i]<0 then alfa[i]:=alfa[i]+pi; end; alfa[n+1]:=alfa[1]; for i:=1 to n do begin beta[i]:=alfa[i+1]-alfa[i]; while abs(beta[i])>pi do begin if beta[i]=pi then begin writeln('Nekorekti defineets daudzstuuris!'); readln; halt; end; if beta[i]>pi then beta[i]:=beta[i]-2*pi else beta[i]:=beta[i]+2*pi; end; if beta[i]=0 then begin writeln('Nekorekti nodefineets daudzstuuris!'); readln; halt; end; end; q:=0; for i:=1 to n do begin if q=0 then begin if beta[i]>0 then q:=1; if beta[i]<0 then q:=-1; end else if q*beta[i]<0 then begin writeln('Ieliekts!!!'); readln; goto graf; end; end; writeln('Izliekts!!!'); readln; graf: initgraph(d,m,''); reiz:=320; for i:=2 to n do begin if x[i]<>0 then if 320/abs(x[i])0 then if 320/abs(y[i])