- 博客(15)
- 收藏
- 关注
原创 6.14
#include using namespace std; const double pi=3.14; class container{ protected: double r; public: container(double radius) { r=radius; } virtual double surface_area()=0; virtual double volume(
2015-06-27 18:47:28
285
原创 6.13
#include using namespace std; const double pi=3.14; class Base{ protected: double h; public: Base(double high) { h=high; }; virtual double disp()=0; }; class Cuboid:public Base{ protected: dou
2015-06-27 18:46:54
258
原创 6.12
#include using namespace std; class area_cl{ protected: double height; double width; public: area_cl(double r,double s) { height=r;width=s; } virtual double area()=0; }; class rectangle:public
2015-06-27 18:45:59
308
原创 5.18
#include #include using namespace std; class person{ private: int num; string name; public: person(int num1,string name1) {num=num1;name=name1;} person() {} void set() { cout>n
2015-05-28 09:11:00
302
原创 5.19
#include #include using namespace std; class base{ private: string name; int age; public: base(string name1,int age1) { name=name1;age=age1; } void show() { cout<<"姓名:"<<name<
2015-05-28 09:10:12
274
原创 实验四
#include using namespace std; class student{ public: student(float score1); void account(); static void sum() { cout<<"总成绩为:"<<total_score<<endl; } static void average() { doubl
2015-05-10 17:26:08
242
原创 实验三
#include #include using namespace std; class location { public: location(double X,double Y) { x=X; y=Y; } double location::Getx() { return x; } double location::Gety() {
2015-05-10 17:23:23
337
原创 4.19-4.20
4.19 #include using namespace std; class book{ public: book(int qu1) { qu=qu1; price=10*qu1; } void show() { cout<<qu*price<<'\t'; } private: int qu; int price; };
2015-05-10 17:22:11
276
原创 4.21-4.22
4.21 #include #include using namespace std; class student{ public: student(int num1,string name1,double score1) { num=num1; name=name1; score=score1; } void showcj() { cout<
2015-05-10 17:21:47
382
原创 4.17-4.18
4.17 #include #include using namespace std; class student{ public: student(string name1,int num1,double score1) { name=name1; num=num1; score=score1; } void show() {
2015-05-10 17:19:21
276
原创 3.24
#include using namespace std; class Date { public : Date(int y,int m,int d); void getyear(); void getmonth(); void getday(); void setdate(int y,int m,int d); void printDat
2015-04-12 10:11:30
421
1
原创 3.23
#include using namespace std; class cylinder { public: cylinder(double r,double h); void vol(); private: double V; }; cylinder::cylinder(double r,double h) { V=(r*r*3.14*h); } void cylin
2015-04-08 18:11:25
315
1
原创 3.22
#include using namespace std; const double pi=3.14; class Circle { public: Circle(double r); void area(); private: double radius; }; Circle::Circle(double r) { radius=r; } void Circ
2015-04-08 18:08:56
292
1
原创 4*4魔方程序
#include using namespace std; class magic { public: magic(int f,int n); void setfirstmagic(); void generatemagic(); void printmagic(); private: int m[4][4]; int step; int first; i
2015-04-08 18:07:07
887
1
原创 前二章作业
2.29: #include using namespace std; int main() { int*p=new int[20]; p[0]=1;p[1]=1; for(int i=2;i<20;i++) p[i]=p[i-2]+p[i-1]; for(int j=0;j<20;j++) cout<<p[j]<<endl; delete p; sys
2015-03-29 18:52:06
390
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人