第二章第二题(计算圆柱体的体积)(Compute the volume of a cylinder)

您所在的位置:网站首页 求圆柱体的面积和体积的计算题 第二章第二题(计算圆柱体的体积)(Compute the volume of a cylinder)

第二章第二题(计算圆柱体的体积)(Compute the volume of a cylinder)

2024-07-09 11:36| 来源: 网络整理| 查看: 265

2.2(计算圆柱体的体积)编写程序,读入圆柱体的半径和高,并使用下列公式计算圆柱的体积: 面积 = 半径 × 半径 × π 体积 = 面积 × 高 下面是一个运行示例: Enter the radius and length of a cylinder:5.5 12 The area is 95.0331 The volume is 1140.4

2.2(Compute the volume of a cylinder) Write a program that reads the radius and length of a cylinder and computes the area and volume using the following formulas: area = radius × radius × π volume = area × length Here is a simple run: Enter the radius and length of a cylinder:5.5 12 The area is 95.0331 The volume is 1140.4

参考代码:



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3