C语言实验——圆柱体计算

#include <stdio.h>
#include <stdlib.h>


int main()
{
    int r, h;
    double PI, l, s1, s2, v;
    PI = 3.1415926;
    scanf("%d %d", &r, &h);
    l = PI * r * 2;
    s1 = PI * r * r;
    s2 = l * h;
    v = h * s1;
    printf("%.2lf %.2lf %.2lf %.2lf", l, s1, s2, v);
    return 0;
}

相关文章:

  • 2022-02-20
  • 2022-01-21
  • 2022-02-21
  • 2021-07-16
  • 2022-02-22
  • 2021-12-11
  • 2021-07-10
猜你喜欢
  • 2021-12-02
  • 2021-12-01
  • 2022-02-15
  • 2022-02-03
  • 2021-12-19
  • 2021-12-22
  • 2021-11-03
相关资源
相似解决方案