自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 7.6

#include #include using namespace std; typedef struct student {int num; char name[20]; double score; }; int main() { student stud[3]={1234,"jiang",78,1123,"Wang",89.5,1234,"hu",90}, dst

2015-06-15 23:29:47 274

原创 7.3

#include #include using namespace std; int main() { for(int n=1;n<8;n++) cout<<setw(20-n)<<setfill(' ')<<" " <<setw(2*n-1)<<setfill('B')<<"B"<<endl; return 0; }

2015-06-15 23:10:41 234

原创 7.5

#include #include using namespace std; struct staff {int num; char name[20]; int age; double pay; }; int main() { staff staf[7]={2001,"Li",34,1200,2002,"Wang",23,2222,2003,"Fun

2015-06-09 17:31:55 273

原创 7.2

#include #include using namespace std; int main() {float a[5]; cout<<"input data:"; for(int i=0;i<5;i++) cin>>a[i]; cout<<setiosflags(ios::fixed)<<setprecision(2); for(int i=0;i<

2015-06-09 17:21:10 262

原创 7.1

#include #include using namespace std;int main() {double a,b,c,s,area; cout<<"please input a,b,c:"; cin>>a>>b>>c; if (a+b<=c) cerr<<"a+b<=c,error!"<<endl; else if(b+c<=a) cerr<<"

2015-06-09 17:16:09 239

原创 异质链表保存学生信息

#include#includeusing namespace std;class Student{public: virtual void get()=0; virtual void display()=0; string name; int num;};class UGraduate :public Student//本科生{public: void get()

2015-05-26 23:18:01 379

原创 6.5

#include using namespace std; class Shape {public: virtual double area() const =0; }; class Circle:public Shape {public: Circle(double r):radius(r){} virtual double area() cons

2015-05-24 11:06:16 209

原创 6.4

#include using namespace std; class Shape {public: virtual double area() const =0; }; class Circle:public Shape {public: Circle(double r):radius(r){} virtual double area() const {r

2015-05-24 11:00:23 214

原创 6.3

#include using namespace std;class Point{ public: Point(float a,float b):x(a),y(b){} ~Point(){cout<<"executing Point destructor"<<endl;} private: float x; float y; }; class Circl

2015-05-24 10:54:14 207

原创 10.3修改

//扩展程序:创建一个三角形类//修改create_object函数,使得程序支持三角形的创建//和求面积、打印等操作#include using namespace std;class Shape {public: virtual double getArea() const = 0; virtual void print() const = 0; virtual ~Shap

2015-05-19 22:12:56 267

原创 5.10

#include #include using namespace std; class Teacher {public: Teacher(int,char [],char); void display(); private: int num; char name[20]; char se

2015-05-18 07:35:26 219

原创 5.9

#include#include using namespace std; class Teacher{public: Teacher(string nam,int a,char s,string tit,string ad,string t); void display(); protected: string name; int age;

2015-05-18 07:26:12 253

原创 5.4

#include using namespace std; class Student {public: //基类公用成员 void get_value(); void display( ); protected : //基类保护成员 int num; char name[10]; char sex; };

2015-05-17 22:58:56 229

原创 5.3

#include using namespace std;class Student{public: void get_value(); void display( ); protected : int num; char name[10]; char sex; }; void Student::get_value() {ci

2015-05-17 22:47:09 297

原创 5.2

#include using namespace std; class Student {public: void get_value() {cin>>num>>name>>sex;} void display( ) { cout<<"num: "<<num<<endl; cout<<"name: "<<name<<endl; cout<<"sex: "

2015-05-17 22:37:20 287

原创 5.1

#include using namespace std; class Student {public: void get_value(){cin>>num>>name>>sex;} void display( ) { cout<<"num: "<<num<<endl; cout<<"name: "<<name<<endl; cout<<"se

2015-05-17 22:31:06 238

原创 1

#include using namespace std; class Student {public: void get_value() {cin>>num>>name>>sex;} void display( ) {cout<<"num: "<<num<<endl; cout<<"name: "<<name<<endl; cout<<"

2015-05-11 22:53:07 265

原创 7

#include #include using namespace std; class Student {public: Student(int,char[],char,float); int get_num(){return num;} char * get_name(){return name;} char get_sex(){return sex;}

2015-05-11 22:49:04 268

原创 6

#include using namespace std; class Complex {public: Complex(){real=0;imag=0;} Complex(double r){real=r;imag=0;} Complex(double r,double i) {real=r;imag=i;}

2015-05-11 22:35:35 298

原创 5

#include using namespace std; class Matrix {public: Matrix(); friend Matrix operator+(Matrix &,Matrix &); friend ostream& operator<<(ostream&,Matrix&); friend istream& opera

2015-05-11 22:30:42 258

原创 综合

#include #include using namespace std; class Time { public: void display(){cout<<hour<<":"<<minute<<":"<<sec<<endl;} protected: int hour; int minute; int sec; };

2015-05-11 22:20:50 212

原创 4.cpp

#include using namespace std; class Matrix { public: Matrix(); friend Matrix operator+(Matrix &,Matrix &); void input();

2015-05-11 22:15:20 252

原创 3.cpp

#include using namespace std;class Complex {public: Complex() {real=0;imag=0;} Complex(double r,double i) {real=r;imag=i;} Complex operator+(Complex &c2); Complex opera

2015-04-28 20:33:17 264

原创 2.cpp

#include using namespace std; class Complex {public: Complex() {real=0;imag=0;} Complex(double r,double i) { real=r;imag=i; } Complex operator+(Complex &c2);Comple

2015-04-28 20:06:26 340

原创 1.cpp

#include using namespace std; class Complex {public: Complex() {real=0;imag=0;} Complex(double r,double i) { real=r;imag=i; } double get_real(); double get_ima

2015-04-28 19:29:08 301

原创 关于类的结构图

2015-04-20 16:05:01 524

原创 12.cpp

return 0; }

2015-04-19 22:57:31 330

原创 11.cpp

#include using namespace std; class Time; class Date {public: Date(int,int,int); friend Time; private: int month; int day; int year; }; Date::Date(int m,int d,int y):month(m),day(d),year

2015-04-19 22:52:06 199

原创 10.cpp

#include using namespace std; class Date; class Time {public: Time(int,int,int); friend void display(const Date &,const Time &); private: int hour; int minute; int sec; };Time::Time(int

2015-04-19 22:46:55 215

原创 2.cpp

#include using namespace std; class Date {public: Date(int,int,int); Date(int,int); Date(int); Date(); void display(); private: int month; int day; int year; }; Date::Date(int m,int d

2015-04-19 22:43:32 442

原创 9.cpp

#include using namespace std; class Product{ public: Product(int n,int q,float p):num(n),quantity(q),price(p){}; void total(); static float average(); static void disp

2015-04-19 17:07:09 218

原创 8.cpp

#include using namespace std; class Student { public: Student(int n,float s):num(n),score(s){} void change (int n,float s) {num=n;score=s; } void display() {cout<<num<<""<<score<<endl; };

2015-04-19 11:25:46 256

原创 7.cpp

#include using namespace std; class Student { public: Student(int n,float s):num(n),score(s){} void change (int n,float s) {num=n;score=s; } void display() {cout<<num<<""<<score<<endl; };

2015-04-19 11:19:36 202

原创 6.cpp

#include using namespace std; class Student { public: Student(int n,float s):num(n),score(s){} void change (int n,float s){num=n;score=s; } void display(){cout<<num<<""<<score<<endl; }; pr

2015-04-19 11:13:35 217

原创 3.cpp

#include using namespace std;class Date{public: Date(int=1,int=1,int=2005); void display(); private: int month; int day; int year; };Date::Date(int m,int d, int y):month(m)

2015-04-19 10:49:32 300

原创 5.cpp

#include using namespace std; class Student {public: Student(int n,float s):num(n),score(s){} int num; float score; }; void main() { Student stud[5]={ Student(3901,

2015-04-07 20:52:11 236

原创 4.cpp

#include using namespace std; class Student { public: Student(int n,float s):num(n),score(s){} void display(); private: int num; float score; };void Student::display() { cou

2015-04-07 20:39:51 192

原创 第二章—5

//xt2-5-1.cpp(file1.cpp) #include #include "xt2-5.h" int main()  {Array_max arrmax; arrmax.set_value(); arrmax.max_value(); arrmax.show_value(); return 0; } //xt2-5-2.cpp(arraym

2015-04-07 18:06:37 306

原创 第二章 — 4

//xt2-4-1.cpp(main.cpp)#include using namespace std; #include "student.h" int main() {Student stud; stud.set_value(); stud.display(); return 0; } //xt2-4-2.cpp(student.cpp)

2015-04-07 18:00:29 276

原创 2.1改写

#include using namespace std; class Time { private: int hour; int minute; int sec; public: void set_time(); void display(); }; void Time::set_time() { cin>>hour; cin>>min

2015-03-28 14:28:40 507

空空如也

空空如也

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

TA关注的人

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