?????:
?????? ?????????, ??????????? ????????? ??????? ???? ?????????????? ?????: ??????????????, ???????????? ? ?????.

???????? ??????? ??????:
??????? ??????????????: area = a * b
??????? ????????????: area = sqrt(s * (s ? a) * (s ? b) * (s ? c)), ??? s = (a + b + c) / 2
??????? ?????: area = pi * sqr(d) / 4

???????????? ???????????? ????? ??????, ??????? ??????? ?? ????? ????????, ????? ????? ???? 1, 2 ??? 3.
??? ?????? ????? ?????????? ???????????? ??????????? if-else, ??????? ???????? ?????? ??????????? if-else, ? ??, ? ???? ???????, - ??????:

if 1 then
?????????? ??????? ??????????????
else
if 2 then
?????????? ??????? ????????????
else
if 3 then
?????????? ??????? ?????
else
??????
????????? ?? ????? ???????:
const
pi = 3.14;

var
figure: byte;
area, s, a, b, c, d: real;
ok: boolean;

begin
ok := true;
write('?????? (1 - ?????????????, 2 - ???????????',
', 3 - ????): ');

if figure = 1 then begin
write('????? ??????: ');
area := a * b
end
else
if figure = 2 then begin
write('????? ??????: ');
s := 0.5 * (a + b + c);
area := sqrt(s * (s - a) * (s - b) * (s - c))
end
else
if figure = 3 then begin
write('???????: ');
area := pi * sqr(d) / 4
end
else
ok := false;

if ok then
writeln('???????: ', area:8:2)
else
writeln('?????? ?????');