#includeusing namespace std;#define PI 314159double area(dou
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/16 19:19:12
#include
using namespace std;
#define PI 314159
double area(double radius=0);
double area(double a,double b);
double area(double a,double b,double h);
double area(double a,double b,double c,int);
int main(){
cout
using namespace std;
#define PI 314159
double area(double radius=0);
double area(double a,double b);
double area(double a,double b,double h);
double area(double a,double b,double c,int);
int main(){
cout
area.h
#include
#include
#define PI 314159
double area(double radius=0);
double area(double a,double b);
double area(double a,double b,double h);
double area(double a,double b,double c,int);
area.cpp
#inlcude "area.h"
double area(double radius){
return PI*radius*radius;
}
double area(double a,doubleb){
return a*b;
}
double area(double a,double b,double h){
return (0.5*(a+b)*h);
}
double area(double a,double b,double c,int){
double s=0.5*(a+b+c);
return sqrt(s*(s-a)*(s-b)*(s-c));
}
Exp_2.cpp
#include "area.h"
using namespace std;
int main(){
cout
再问: 运行不了!!!
再答: 帮你调试了下,你的代码有错,- -..我帮你改好了.. area.h #include #include #define PI 314159 double area(double radius=0); double area(double a,double b); double area(double a,double b,double h); double area(double a,double b,double c,int); area.cpp #include #include "area.h" double area(double radius){ return PI*radius*radius; } double area(double a,double b){ return a*b; } double area(double a,double b,double h){ return (0.5*(a+b)*h); } double area(double a,double b,double c,int){ double s=0.5*(a+b+c); return sqrt(s*(s-a)*(s-b)*(s-c)); } Exp_2.cpp #include #include "area.h" using namespace std; int main(){ cout
#include
#include
#define PI 314159
double area(double radius=0);
double area(double a,double b);
double area(double a,double b,double h);
double area(double a,double b,double c,int);
area.cpp
#inlcude "area.h"
double area(double radius){
return PI*radius*radius;
}
double area(double a,doubleb){
return a*b;
}
double area(double a,double b,double h){
return (0.5*(a+b)*h);
}
double area(double a,double b,double c,int){
double s=0.5*(a+b+c);
return sqrt(s*(s-a)*(s-b)*(s-c));
}
Exp_2.cpp
#include "area.h"
using namespace std;
int main(){
cout
再问: 运行不了!!!
再答: 帮你调试了下,你的代码有错,- -..我帮你改好了.. area.h #include #include #define PI 314159 double area(double radius=0); double area(double a,double b); double area(double a,double b,double h); double area(double a,double b,double c,int); area.cpp #include #include "area.h" double area(double radius){ return PI*radius*radius; } double area(double a,double b){ return a*b; } double area(double a,double b,double h){ return (0.5*(a+b)*h); } double area(double a,double b,double c,int){ double s=0.5*(a+b+c); return sqrt(s*(s-a)*(s-b)*(s-c)); } Exp_2.cpp #include #include "area.h" using namespace std; int main(){ cout
#includeusing namespace std;#define PI 314159double area(dou
#include#include#include#includeusing namespace std;#define
C++ 矩阵加法#includeusing namespace std;void plus(double a[],dou
#includeusing namespace std;double tiaohe (double,double);in
#includeusing namespace std;class rmb{ public:rmb(double a,d
sqrt怎么定义啊?#includeusing namespace std;int main(){ double a,b
C++圆的面积求法#include#define PI 3.14using namespace std;int main
#include#include#includeusing namespace std;int main(){char
#include#include#includeusing namespace std;int main(){\x05i
X=xx,#include#includeusing namespace std;class point {public
#includeusing namespace std;template int Search(T a[],int no
#include#includeusing namespace std;class Vehicle{public:\x0