Function V(h,r:real):real;
Begin
result:=1/3*Pi*r*r*h // ABC, ABC.net
// V:=1/3*Pi*r*r*h // Turbo, Free
End;
Function SPP(h,r:real):real;
Begin
result:=Pi*r*(R+Sqrt(r*r+h*h));
End;
Var
h,r,V0,S,SumS,SumV:real;
Begin
Write('h1 = ');ReadLn(h);
Write('r1 = ');ReadLn(r);
V0:=V(h,r);
SumV:=V0;
S:=SPP(h,r);
SumS:=S;
WriteLn('V1 = ',V0);
WriteLn('S1 = ',S);
WriteLn;
Write('h2 = ');ReadLn(h);
Write('r2 = ');ReadLn(r);
V0:=V(h,r);
SumV:=SumV+V0;
S:=SPP(h,r);
SumS:=SumS+S;
WriteLn('V2 = ',V0);
WriteLn('S2 = ',S);
WriteLn;
Write('h3 = ');ReadLn(h);
Write('r3 = ');ReadLn(r);
V0:=V(h,r);
SumV:=SumV+V0;
S:=SPP(h,r);
SumS:=SumS+S;
WriteLn('V3 = ',V0);
WriteLn('S3 = ',S);
WriteLn;
WriteLn('Sum V = ',SumV);
WriteLn('Sum S = ',SumS);
End.