zoukankan      html  css  js  c++  java
  • 5-1

    #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;
    }
  • 相关阅读:
    洛谷
    洛谷
    洛谷
    洛谷
    洛谷
    模板
    模板
    模板
    洛谷
    模板
  • 原文地址:https://www.cnblogs.com/lxhlxx900126/p/3352346.html
Copyright © 2011-2022 走看看