C++问题,编写一个程序计算出球、圆柱和圆锥的表面积和体积

C++问题,编写一个程序计算出球、圆柱和圆锥的表面积和体积
#include
#include
using namespace std;
#define PI 3.1415
class circle
{
public:
\x09void information()
\x09{\x09
\x09\x09double a;
\x09\x09couta;
\x09}
};
class sphere:public circle
{
public:
void first(double s1,double a)
\x09{
\x09\x09double v1;
\x09\x09s1=4*PI*a*a;
//第一二处错误
v1=(PI*a*a*a*4)/3;
cout
其他人气:365 ℃时间:2019-12-01 10:36:28
优质解答
你的程序何止那几处错误,简直惨不忍睹.我简单的修改了,编译通过了.#include <iostream>#include <string>using namespace std;#define PI 3.1415class circle{p...
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版