1
var a,b:integer;
c:real;
begin
Write('a='); readln(a);
Write('b='); readln(b);
c:=sqrt(sqr(a)+sqr(b));
Writeln('P= ',a+b+c);
Writeln('S= ',(a*b)/2);
end.
Пример:
a=5
b=12
P= 30
S= 30
1
var a,b:integer;
c:real;
begin
Write('a='); readln(a);
Write('b='); readln(b);
c:=sqrt(sqr(a)+sqr(b));
Writeln('P= ',a+b+c);
Writeln('S= ',(a*b)/2);
end.
Пример:
a=5
b=12
P= 30
S= 30