5-1

#include<stdio.h>
int main(void)
{
    double height,radius,volume;
    double cylinder(double r,double h);
    printf("Enter tadius and height:");
    scanf("%lf%lf",&radius,&height);
    volume=cylinder(radius,height);
    printf("Vplume=%.3f\n",volume);
    return 0;
}
    double cylinder(double r,double h)
    {
        double result;
        result=3.1415926*r*r*h;
        return result;
    }

posted @ 2013-10-06 11:15  吕鼎鼎19950427  阅读(120)  评论(0编辑  收藏  举报