- 博客(8)
- 收藏
- 关注
原创 4.22
#include #include using namespace std; class dot{ public: dot(int a,int b); void show(); friend void dist(dot&,dot&); private: int x; int y; }; dot::dot(int a,int b) { x=a; y=b; } void dot::sho
2015-07-01 09:57:17
370
原创 4.21
#include #include using namespace std; class student{ public: student(string a,int b,int c); void show() { cout<<"name:"<<name<<" id:"<<id<<" score:"<<score<<" test:"<<test<<" number:"<<numbe
2015-06-29 15:29:43
438
原创 4.20
#include #include using namespace std; class book{ public: book(int a,int b) { qu=a; price=b; } void show() { cout<<qu*price<<endl; } private: int qu; int price; }; int main() { book
2015-06-29 15:28:37
442
原创 4.19
#include #include using namespace std; class book{ public: book(int a,int b) { qu=a; price=b; } void show() { cout<<qu*price<<endl; } private: int qu; int price; }; int main() { book
2015-06-29 15:27:40
366
原创 4.17&4.18
#include #include using namespace std; class student{ public: void show() { cout<<name<<" "<<number<<" "<<test<<endl; } student(string x,int y,int z); friend void max(student *i); private: s
2015-06-29 15:24:10
346
原创 第三章作业
3.22 #include #include using namespace std; class Circle{ public: void area(int x,double y); void show(); private: int radius; double Area; }; void Circle::area(int x,double y) { radius=x;
2015-04-22 19:05:39
462
1
原创 魔方
#include #include using namespace std; class magic { public: void getdata();//输入初始成员函数 void setfirstmagic();//设置初始魔方成员函数 void generatemagic();//生成最终魔方成员函数 void printmagic();//显示魔方成员函数 private: in
2015-04-22 18:22:12
552
1
原创 第二章作业
2.29 #include using namespace std; const int n=20; int Fbi(int i,int j) { int t; t=i+j; return t; } int main() { int *p,a; p=new int[n]; p[0]=1; p[1]=1; for(a=2;a<n;a++) { p[a]=Fbi(p[a-1]
2015-04-01 18:58:55
541
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人