\title{Área del pentágono}
\language{en}
\range{-5..5}
\author{Gang XIAO}
\email{xiao@unice.fr}
\computeanswer{no}
\format{html}
\precision{10000}

\integer{min=6}
\integer{max=13}
\integer{x0=random(\max-2..\max+4)}
\integer{y0=random(-2..2)}
\integer{x1=random(\min..\max)}
\integer{y1=random(\min+3..\max+3)}
\integer{x2=random(-\min..-\max)}
\integer{y2=random(\min..\max)}
\integer{x3=random(-\min..-\max)}
\integer{y3=random(-\min..-\max)}
\integer{x4=random(\min..\max)}
\integer{y4=random(-\min-3..-\max-3)}
\integer{u1=\x1-\x0}
\integer{v1=\y1-\y0}
\integer{u2=\x2-\x0}
\integer{v2=\y2-\y0}
\integer{u3=\x3-\x0}
\integer{v3=\y3-\y0}
\integer{u4=\x4-\x0}
\integer{v4=\y4-\y0}
\integer{a1=\u1*\v2-\u2*\v1}
\integer{a2=\u2*\v3-\u3*\v2}
\integer{a3=\u3*\v4-\u4*\v3}
\real{aire=0.5*abs(\a1+\a2+\a3)}
\integer{r=random(0,1)}
\text{B=\r=1?\x1,\y1:\x4,\y4}
\text{E=\r=1?\x4,\y4:\x1,\y1}
\text{C=\r=1?\x2,\y2:\x3,\y3}
\text{D=\r=1?\x3,\y3:\x2,\y2}

\statement{Hallar el área del pentágono <i>ABCDE</i> en el plano cartesiano, cuyos 5 vértices son
<p><center>
 <i>A</i> = (\x0,\y0) , <i>B</i> = (\B) ,
 <i>C</i> = (\C) , <i>D</i> = (\D) , <i>E</i> = (\E) .
</center> <p>
}

\answer{Área}{\aire}