Pagini recente » Cod sursa (job #871421) | Cod sursa (job #795724) | Cod sursa (job #2828963) | Cod sursa (job #1757235) | Cod sursa (job #1745210)
type punct=record
x,y:extended;
end;
tablou=array [1..1000002]of punct;
var t:tablou;
i,n:longint;
aria:extended;
f,g:text;
begin
assign(f,'aria.in');
assign(g,'aria.out');
reset(f);
rewrite(g);
readln(f,n);
for i:=1 to n do
read(f,t[i].x,t[i].y);
n:=n+1;
t[n].x:=t[1].x;
t[n].y:=t[1].y;
aria:=0;
for i:=1 to n do
aria:=aria+(t[i].x*t[i+1].y-t[i+1].x*t[i].y);
write(g,aria/2:0:5);
close(f);
close(g);
end.