![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
第三章
raojinliang
这个作者很懒,什么都没留下…
展开
-
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 · 265 阅读 · 0 评论 -
第六题
#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 · 290 阅读 · 0 评论 -
第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 · 685 阅读 · 0 评论 -
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 · 312 阅读 · 0 评论 -
第四题
#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 · 373 阅读 · 0 评论 -
第五题
#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 · 293 阅读 · 0 评论