自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 第六周任务(2)B

#include #include class A { private: int *a; int n; int MaxLen; public: A(): a(0), n(0), MaxLen(0) {} ~A(); int GetValue(int i) {return a[i];}//函数体返回a[i]的值

2012-03-28 19:40:04 487 1

原创 第六周任务(5)

头文件部分: #include #include using namespace std; enum SymmetricStyle { axisx,axisy,point};//分别表示按x轴, y轴, 原点对称 class CPoint { private: double x; // 横坐标 double y; // 纵坐标 public: CPoint(double xx=0,d

2012-03-27 19:32:40 488 1

原创 第六周任务(4)

#include #include using namespace std; enum SymmetricStyle { axisx,axisy,point};//分别表示按x轴, y轴, 原点对称 class CPoint { private: double x; // 横坐标 double y; // 纵坐标 public: CPoint(double xx=0,double y

2012-03-27 19:28:34 501 2

原创 第六周任务(2)A

#include #include using namespace std; class A { private: int a; public: A() {a=0;} A(int):a(x){} //定义构造函数,用参数aa初始化数据成员a }; void main() { A *p; //定义类A的指针对象p p=nwe A(2); //用p指向动态对象并初

2012-03-26 21:26:14 672 2

原创 第六周任务(3)

#include #include using namespace std; enum SymmetricStyle { axisx,axisy,point};//分别表示按x轴, y轴, 原点对称 class CPoint { private: double x; // 横坐标 double y; // 纵坐标 public: CPoint(double xx=0,double y

2012-03-26 21:14:34 384 1

原创 第六周任务(1)

修改一#include using namespace std; class C { private: int x; public: C(int a); int getX()const{return x;} }; C::C(int a):x(a){} void main() { const C c(5); cout<<c.getX(); system("pause"); }修改二#

2012-03-26 21:12:50 414

原创 第五周任务(4)

#include using namespace std; class Student { private: int num; int score; public: int max(Student *arr); Student(int n,int s):num(n),score(s){} void show(); }; int Student::max(Student *arr

2012-03-22 22:26:28 395

原创 第五周任务(2)

#include using namespace std; enum OutStyle{original, simplified, mixed, approximate}; int gcd(int m, int n); class CFraction { private: int nume; // 分子 int deno; // 分母 publi

2012-03-22 18:47:27 406 1

原创 第五周任务(3)

#include using namespace std; class Box { public: Box(int h=10,int w=10,int len=10); void set_Box(); void show_Box(); private: int height; int width; int length; }; #include"he.h" Box::Box(int

2012-03-22 18:45:33 481

原创 第五周任务(-)

#include #include using namespace std; class Triangle {public: Triangle(double x=1,double y=1,double z=1); double perimeter(void);//计算三角形的周长 double area(void);//计算并返回三角形的面积 void showMessage(); p

2012-03-22 18:44:55 407

原创 disizhourenwu (3)

class NaturalNumber {private: int n; public: void setValue (int x);//置数据成员n的值,要求判断是否是正整数 int getValue(); //返回私有数据成员n的值 bool isPrime(); //判断数据成员n是否为素数,是返回true,否则返回false void printFactor(); /

2012-03-14 20:37:00 612 2

原创 第四周任务(4)

#include using namespace std; class Salary { public: void set_salary(); void add_salary(); void paixu_salary(); private: double salary[50]; int number; } #include using namespace std;

2012-03-14 19:17:54 663 1

原创 第四周任务(2)

1. 本学期的报告均发到csdn博客。周一上机,周四前要完成本周上机任务并发布博文。代码应该用代码工具插入,见http://blog.csdn.net/sxhelijian/article/details/7203086 2. 本学期起程序头部的注释请自行加入,从本学期起不再统一给出。这是一个程序员良好习惯中的一部分,养成这个习惯。这也是展示个人专业品质的一个重要途径。另外,在程序中需要的地方,

2012-03-14 18:30:58 662 2

原创 第四周任务(1)

#include #include using namespace std; class Triangle {public: void Setabc(float x, float y, float z);//置三边的值,注意要能成三角形 void Getabc(float *x, float *y, float *z);//取三边的值 float Perimeter(void);/

2012-03-14 18:29:13 392 1

原创 第二周任务(3)2

#include using namespace std; class Time { public: void set_time( ); void show_time( ); void add_seconds(int); void add_minutes(int); void add_hours(int) ; private: bool is_time(int, int

2012-03-08 21:12:35 607 1

原创 第二周任务2

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

2012-03-08 21:09:08 420 1

原创 第二周任务3(1)

#include using namespace std; class Time { public: void set_time(); void show_time(); inline void add_a_sec(); inline void add_a_minute(); inline void add_a_hour(); private: bool is_time(int ,int

2012-03-08 21:07:30 679 1

原创 第二周任务4

#include using namespace std; class Chang { public: void set_chang(); void show_chang(); private: int length; int width; int height; int s; int v; }; void Chang::set_chang() { cout<<"请输入长

2012-03-08 21:06:36 406 1

原创 第一周任务二

#include using namespace std; long fac(int n); long fac(int n)//求n的阶乘 { int a=1,b; for(b=n;b>=1;b--) a=a*b; } int main() { int m,n; long c;//所求阶乘值 cin>>m; cin>>n; c=fac(m)/(fac(n)*fac(m-n)); return c

2012-03-04 18:45:35 611 1

原创 第一周任务一(2)

#include using namespace std; int main() { int a,b=0,c; int m[40]; cin>>a; do { m[b]=a%2; b=b+1; a=a/2; }while(a>0); for(c=b-1;c>=0;c--) cout<<m[c]; cout<<endl; }

2012-03-04 18:44:40 338 1

原创 第一周任务一

#include using namespace std; void d2b(int n) { if( n==0 ) cout<<0; else { cout<<n%2; d2b(n/2); } } int main() { int a; cin>>a;//输入十进制数 d2b(a);//转换成二进制数输出 cout<<endl; return 0; }

2012-03-04 18:43:48 321

空空如也

空空如也

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

TA关注的人

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