自定义博客皮肤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)
  • 收藏
  • 关注

原创 单链表

#includeusing namespace std;templatestruct Node{ DataType data; Node*next;};templateclass LinkList{public: LinkList(); LinkList(DataType a[],int n); ~LinkList(); int Locate(DataType x);

2015-11-04 22:49:18 361

原创 顺序表

#includeusing namespace std;const int MaxSize=100; //线性表最多有100个元素class SeqList{public: SeqList() {length=0;}//无参构造函数,创建一个空表 SeqList(int a[],int n); //有参构造函数 ~SeqList(){}//析构函数 void Insert(

2015-11-04 22:28:30 399

原创 5.19

#include#includeusing namespace std;class base{private: string name; int age;public: base(string name1,int age1) { name=name1;age=age1; } void show() { cout<<"姓名:"<<name<<endl; cout<

2015-05-21 08:35:17 337

原创 5.18

using namespace std;class person{public: person() {} void input() { cout<<"请输入编号:"; cin>>num; cout<<"请输入姓名:"; cin>>name; } void show() { cout<<"编号:"<<num<<endl; cout<<"姓名:"<<name<

2015-05-20 23:46:21 347

原创 6.14

#includeusing 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-05-20 23:45:31 455

原创 6.13

#includeusing 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-05-20 23:42:02 342

原创 6.12

#includeusing 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-05-20 23:40:36 555

原创 4.22

#include#includeusing namespace std;class location{public: location(double ,double); void show(); friend double dist(location& d1,location& d2);private: double x,y;};location::location(

2015-05-06 23:00:21 417 1

原创 4.21

#include#includeusing namespace std;class student{public: student(int num1,string name1,double score1) { num=num1; name=name1; score=score1; } void showcj() { cout<<"学号:"<<num<<endl;

2015-05-06 22:56:38 371 1

原创 4.20

#includeusing namespace std;class book{public: book(int qu1); void show();private: int qu; int price;};book::book(int qu1){ qu=qu1; price=10*qu1;}void book::show(){ cout<<qu*price

2015-05-06 22:54:50 407 1

原创 4.19

#includeusing namespace std;class book{public: book(int qu1); void show();private: int qu; int price;};book::book(int qu1){ qu=qu1; price=10*qu1;}void book::show(){ cout<<qu*price

2015-05-06 22:51:08 368 1

原创 4.18

#include#includeusing namespace std;class student{ public: student(string name1,int num1,float score1); static void showmax(student*p) { int big=p[0].score ; int t; for(int i=0;i<6;i++)

2015-05-06 22:49:21 396 1

原创 4.17

#include#includeusing namespace std;class Student{private: string name; int number; float score;public: void setStudent(string n ,int num,float s) {name=n; number=num; score=s; } vo

2015-04-29 15:42:05 394 1

原创 3.24

#include#includeusing namespace std;class Date{private: int year; int month; int day;public: Date() {year=1995; month=8; day=16; } Date(int y,int m,int d) {year=y; month=m; day=d; }

2015-04-15 16:03:29 365 1

原创 3.23

#includeusing namespace std;const double PI=3.14;class cylinder{ double r; double h;public:cylinder () {r=0; h=0; } cylinder(double x,double y) {r=x; h=y; } doubl

2015-04-11 23:00:22 402 1

原创 3.22

#includeusing namespace std;class Circle{ double r; double cs;public: void radius_input() {cout<<"Input r:"; cin>>r; } void c_area_out() {cs=3.14*r*r; cout<<"The area of circle is:"<<cs;

2015-04-11 22:44:49 331 1

原创 2.29

#include #include using namespace std; int main() { int*p; p = new int [20]; p[0]=p[1]=1; for(int i=2;i<20;i++) p[i]=p[i-2]+p[i-1]; for(int k=0;k<20;k++) { if(k%4==0) cout co

2015-04-09 09:32:02 416 1

原创 学生类

#include#includeusing namespace std;class Student{public: Student(int I, string n,int C,int m,int E); void showStudent();private: int ID; string name; int Chinese; int math; int English

2015-04-09 09:29:35 469 1

原创 作业2.3

#include#includeusing namespace std;int sroot(int i){return sqrt(i);}long sroot(long j){return sqrt(j);}double sroot(double k){return sqrt(k);}int main(){int i=16;long j=

2015-04-09 09:26:58 877 1

空空如也

空空如也

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

TA关注的人

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