Pagini recente » Cod sursa (job #907457) | Cod sursa (job #1905721) | Cod sursa (job #1087248) | Cod sursa (job #448599) | Cod sursa (job #948303)
Cod sursa(job #948303)
var n,i:longint;
f1,f2,y1,y2,x1,x2,s:real;
begin
assign(input,'aria.in'); reset(input);
assign(output,'aria.out'); rewrite(Output);
readln(n); s := 0;
readln(f1,f2);
x1 := f1; y1 := f2;
for i := 2 to n do
begin
readln(x2,y2);
s := s + (x1*y2-x2*y1) ;
x1 := x2;
y1 := y2;
end;
x2 := f1; y2 := f2;
s := s + (x1*y2-x2*y1) ;
s := abs(s/2);
writeln(s:0:6);
close(input);
close(output);
end.