24.
var a,h:integer; so,s,v:real;
begin
write('a = '); readln(a);
write('h = '); readln(h);
so:=(3*sqrt(3)*a*a)/2;
s:=2*so+6*a*h;
v:=so*h;
writeln('s = ',s,' v = ',v);
end.
Пример:
a = 5
h = 7
s = 339.903810567666 v = 454.66333698683
25.
var a,b,c:integer; d:real;
begin
write('a = '); readln(a);
write('b = '); readln(b);
write('c = '); readln(c);
d:=sqrt(a*a+b*b+c*c);
writeln('d = ',d:4:2);
end.
Пример:
a = 3
b = 4
c = 5
d = 7.07
26.
var r1,r2,h:integer; l,s:real;
begin
write('r1 = '); readln(r1);
write('r2 = '); readln(r2);
write('h = '); readln(h);
l:=sqrt((r1-r2)*(r1-r2)+h*h);
s:=pi*(r1*r1+(r1+r2)*l+r2*r2);
writeln('s = ',s:4:2);
end.
Пример:
r1 = 5
r2 = 3
h = 7
s = 289.78