自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 第七单元 7.10

#include class base { public: base(int a,int b,int c,int d); base(){} friend base operator+(base &x,base &y); friend base operator-(base &x,base &y); void input(); void

2015-06-30 14:11:43 264

原创 第七单元 7.9

#include class base { public: int a[2][2]; base(int a,int b,int c,int d); base(){} void input(); void show(); }; void base::show() { for(int i=0;i<2;i++)

2015-06-30 14:05:54 247

原创 第五单元5.19

#include #include using namespace std; class base{ public: base(string a,int b) { name=a; age=b; } void show() { cout<<"姓名:"<<name<<" "<<"年龄:"<<age<<endl; } private: string name; int age

2015-06-27 23:00:56 261

原创 第五单元 5.18

#include #include using namespace std; class person { public: person(string a,string b) { name=a; num=b; } void Getab() { cout<<"姓

2015-06-27 17:47:13 299

原创 第八单元8.16

#include using namespace std; template class Add { public: Add(T a, T b,T c) {x=a;y=b;z=c;} T sum() {return x+y+z;} private: T x,y,z; }; int main() { Addsum1(6,9,4); Addsum2(2.3,54.2

2015-06-09 22:39:42 280

原创 第八单元8.15

#include using namespace std; template T max(T *a ,int b) { int i,j=0; for(i=1;i<b;i++) if(a[i]>a[j]) {j=i;} return a[j]; } int main() { int a1[]={6,8,52,45,95,41}; double a2[]={36.2,5.6,62

2015-06-09 22:36:04 267

原创 第四单元 4.21

#include #include using namespace std; class student { public: student(int num,string name1,float score1); void show(); static void show_all(); private: int num; string name; float score; stati

2015-05-10 16:17:37 308

原创 第四单元 4.22

#include #include using namespace std; class location { public: location(double a,double b) { x=a; y=b; } friend void dist(location &e,location &f); void show() { cout<<"the point is:"; cou

2015-05-10 16:16:41 293

原创 第四单元 4.20

#include #include using namespace std; class book{ public: book(int i) { qu=i; price=10*i; } void show() { cout<<qu*price<<endl; } private: int qu; int price; }; int main() { boo

2015-05-03 20:50:58 274 1

原创 第四单元 4.19

#include #include using namespace std; class book{ public: book(int i) { qu=i; price=10*i; } void show() { cout<<qu*price<<endl; } private: int qu; int price; }; int main() { book b

2015-05-03 20:29:57 346 1

原创 第四单元 4.18

#include #include using namespace std; class Student{ public: Student(string a,int b,double c) { name=a; num=b; score=c; } friend void max(Student *p); private: string name; int num; double sc

2015-05-03 19:17:17 258 1

原创 第四单元4.17

#include #include using namespace std; class Student { public: void setstu(string a,int b,int c) { name=a; num=b; point=c; } void show() { cout<<"姓名:"<<name<<"\t"<<"学号:"<<num<<"\t"<<"分数:

2015-04-16 12:39:56 294 1

原创 第三单元 魔方

#include #include using namespace std; class magic { public: void getdata(int a,int b); void setfirstmagic(); void generatemagic(); void printmagic(); private:

2015-04-15 21:12:42 327 1

原创 第三章作业 3.24

#include using namespace std; class Date { public: void printdate() { cout<<year<<"."<<month<<"."<<day<<endl; } void Getyear() { cout<<"year"<<"="<<year<<endl; } void Getmonth() { cout<<

2015-04-12 14:33:23 365 1

原创 学生类的定义

#include #include using namespace std; class Student { private: int id; char name[20]; double high; double weight; public: void inputStuden

2015-04-01 18:56:57 461 1

原创 第三单元作业 3.23

#include using namespace std; class Cylinder { public: Cylinder(double r,double h); void vol() { cout<<"圆柱体的体积:"<<v<<endl; } void get() { v=3.14*radius*radius*high; } private: double r

2015-04-01 18:42:44 405 1

原创 第二单元作业 2.30

#include #include #include using namespace std; int sroot(int a) { return sqrt(a); } long sroot(long b) { return sqrt(b); } double sroot(double c) { return sqrt(c); } int main() { int d=4; l

2015-04-01 14:57:40 354 1

原创 第三单元作业 3.22

#include using namespace std; class Circle { public: Circle(double r); double area() { double s=3.14*radius*radius; return s; } private: double radius; }; Circle::Circle(double r) { radius

2015-04-01 14:56:12 365 1

原创 第二单元作业 2.29

#include using namespace std; const int A=20; int main() { int *p; p=new int[A]; int i; p[0]=p[1]=1; for(i=2;i<A;i++) { p[i]=p[i-1]+p[i-2]; }

2015-04-01 14:53:40 400 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除