- 博客(13)
- 收藏
- 关注
原创 第七章
01.1.#include 02.#include 03.using namespace std; 04.void area(float a,float b,float c) 05.{ 06. double s,area; 07. if(a+b<=c) 08. cerr<<"a+b<=c,error!"<<endl; 09. else i
2015-06-16 20:03:25 286
原创 用一个异质链表保存学生数据
#include #include using namespace std; class Student { public: virtual void get()=0; virtual void display()=0; string name; string num; }; class UnderGrad :public
2015-06-02 18:47:01 321
原创 第六章
1. #include class Point {public: Point(float x=0,float y=0); void setPoint(float,float); float getX() const {return x;} float getY() const {return y;} fr
2015-05-26 20:03:46 360
原创 第五章
1.#include 02.using namespace std; 03.class Student{ 04.public: 05. void get_value() 06. {cin>>num>>name>>sex;} 07. void display() 08. { 09. cout<<"num:"<<num<<endl; 10.
2015-05-17 17:19:58 266
原创 第四章
01.1.#include 02.using namespace std; 03.class Complex{ 04.public: 05. Complex() 06. { 07. real=0; 08. imag=0; 09. } 10. Complex(double r,double i) 1
2015-05-17 16:34:42 257
原创 第7、8、9、10、11、12题
7.(1) #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() void display()const {
2015-04-20 22:34:33 667
原创 第六题
#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-20 18:10:34 280
原创 第五题
#include using namespace std;class Student{public: Student(int n,int s):num(n),score(s){} int num; int score;};void max(Student *a){ int i,k=0,max_score=a[0].score; for(i=1;i<5;i++) { i
2015-04-20 18:07:32 283
原创 第四题
#include using namespace std;class Student{public: Student(int n,int s):num(n),score(s){} void display();private: int num; int score;};void Student::display(){ cout<<num<<" "<<score<<endl
2015-04-20 18:01:32 365
原创 C++第三章
#include using namespace std;class Student{public: Student(int n,int s):num(n),score(s){} void display();private: int num; int score;};void Student::display(){ cout<<num<<" "<<score<<endl
2015-04-20 17:58:47 303
原创 C++第三章
#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),day(d),year(y){}v
2015-04-20 17:56:43 258
原创 0143890饶锦亮第一次C++作业
7.#include using namespace std;int main(){ int max(int a,int b,int c=0); int a,b,c; cin>>a>>b>>c; cout<<"max(a,b,c)="<<a<<endl; cout<<"max=(a,b)="<<a<<endl; return
2015-04-07 19:49:24 300
原创 0143890饶锦亮第一次C++作业
7.#include using namespace std;int main(){ int max(int a,int b,int c=0); int a,b,c; cin>>a>>b>>c; cout<<"max(a,b,c)="<<a<<endl; cout<<"max=(a,b)="<<a<<endl; return 0;}int max(int a,int b,i
2015-04-07 19:24:37 326
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人