Ответ(ы) на вопрос:
Гость
24)
int main(){
double a, h, S, V;
cin >> a >> h;
S = 6 * a * h + 3 * sqrt(3) * a * a;
V = 3 * sqrt(3) * a * a * h;
cout << "площадь равно " << S <<"\n";
cout << "объем равно " << V <<"\n";
return 0;
}
25)
int main(){
double a, b, c, d;
cin >> a >> b >> c;
d = sqrt(a * a + b * b + c* c);
cout << d;
return 0;
}
26)
int main(){
double r1,r2, h, S, l;
cin >> r1 >> r2 >> h;
l = sqrt( (r1-r2) * (r1-r2) + h * h );
S = 3.14 * (r1 * r1 + l * (r1 + r2) + r2 * r2);
cout << S;
return 0;
}
Гость
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
Не нашли ответ?
Похожие вопросы