листинг программы
uses crt;
var a,b,c:integer; ma,mb,mc:real;
procedure med(a,b,c:integer);
var ma,mb,mc:real;
begin
ma:=sqrt(2*sqr(b)+2*sqr(c)-sqr(a))/2;
mb:=sqrt(2*sqr(a)+2*sqr(c)-sqr(b))/2;
mc:=sqrt(2*sqr(b)+2*sqr(a)-sqr(c))/2;
end;
write('a,b,c');
read(a,b,c);
med(a,b,c);
writeln('ma=',ma,'mb=',mb,'mc=',mc);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
листинг программы
uses crt;
var a,b,c:integer; ma,mb,mc:real;
procedure med(a,b,c:integer);
var ma,mb,mc:real;
begin
ma:=sqrt(2*sqr(b)+2*sqr(c)-sqr(a))/2;
mb:=sqrt(2*sqr(a)+2*sqr(c)-sqr(b))/2;
mc:=sqrt(2*sqr(b)+2*sqr(a)-sqr(c))/2;
end;
begin
write('a,b,c');
read(a,b,c);
med(a,b,c);
writeln('ma=',ma,'mb=',mb,'mc=',mc);
end.