Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Write a program in C language and call a function to find the surface area and volume of a cylinder.
Write a program in C language and call a function to find the surface area and volume of a cylinder.
Code:

# include & ltstdio.h & gt

# include & ltstdlib.h & gt

intmain()

{

floatr,h,S,V;

Printf ("Please enter the radius of the cylinder \ n");

scanf("%f ",& ampr);

Printf ("Please enter the height of the cylinder \ n");

scanf("%f ",& amph);

S= 12.5663704*r*h,V = 3. 14 15926 * r * r * h;

Printf ("cylinder surface area is %f, volume is %f", s, v);

return0

}

Extended data

C language to calculate the rectangular area (s), input length (h), width (w) is defined as plasticity:

# include & ltiostream & gt

usingnamespacestd

intmain(){

int,h,w;

CIN & gt; & gth & gt& gtw;

s = h * w;

cout & lt& lts;

return0

}