![](http://images0.cnblogs.com/blog/570146/201310/04203750-4b48e3fdbe2a4689ad5f6d37db3d516a.jpg)
#include<stdio.h> int main(void) { double height,radius,volume; double cylinder(double r,double h); printf("Enter radius and height:"); scanf("%lf%lf",&radius,&height); volume=cylinder(radius,height); printf("Volume=%.3f ",volume); return 0; } double cylinder(double r,double h) { double result; result=3.1415926*r*r*h; return result; }