Pagini recente » Cod sursa (job #2353334) | Cod sursa (job #1095725) | Cod sursa (job #782114) | Cod sursa (job #171272) | Cod sursa (job #943239)
Cod sursa(job #943239)
program arie;
var f,g:text;
n,i:longint;
x,y:array[1..100002] of extended;
s:extended;
begin
assign (f,'aria.in'); reset (f);
assign (g,'aria.out'); rewrite (g);
readln (f,n);
for i:=1 to n do
readln (f,x[i],y[i]);
x[n+1]:=x[1]; y[n+1]:=y[1];
s:=0;
for i:=1 to n do
s:=s+(x[i]*y[i+1]-x[i+1]*y[i]);
s:=abs(s)
write (g,s/2:0:6);
close (f); close (g);
end.