自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 指针

#include using namespace std; void sort (int *p,int m) { int b[20]; int i,j; for(i=m-1,j=0;i>=0,j<m;i--,j++) { b[i]=*(p+j); } for(i=0;i<m;i++) *(p+i

2016-08-28 15:12:45 410

原创 求闰年

#include using namespace std; struct y_m_d { int year; int month; int day; }; int days(y_m_d date) { int m=0,n=0; int i; if(date.year%400==0||date

2016-08-28 15:11:27 441

原创 角色二

#include using namespace std; class Role { public:         Role(string Name,int Blood)         {             name=Name;             blood=Blood;         }         void show()         {  

2016-08-28 14:55:09 482

原创 角色一

#include using namespace std; class Role { public:         void setRole(string Name,int Blood)         {             name=Name;             blood=Blood;         }         void attack()    

2016-08-28 14:54:36 405

原创 公约数

#include using namespace std; int gcd(int x,int y) {    if(x%y==0)     return y;    else     return gcd(y,x%y); } int main() {     int a,b,g;     cin>>a>>b;     g=gcd(a,b);

2016-08-28 14:53:38 482

原创 多少天

#include using namespace std; int main() { int year,month,day; int t=0; cin>>year>>month; if(year%400==0||(year%100!=0&&year%4==0)) t=1; if(t==1) { if(month==1||month==3||month==5||month==7

2016-08-28 14:52:53 816

原创 c++小数位 表示

#include #include using namespace std; struct WageList {     char name[10];  //姓名     double baseWage;   //基本工资     double bonus;      //奖金     double total;       //总额 }; int main( ) {

2016-08-28 14:50:00 2662

原创 学生成绩处理

#include double average(double a,double b,double c,double d) { double e; e=(a+b+c+d)/4.0; return e; } struct Student { char name[32]; int num; double score1; double score2; double score3

2016-08-28 14:48:57 475

原创 向量积

#include  struct zuobiao      {          int x; int y;     };  int main()  {    int  gg; struct zuobiao zuo1; struct zuobiao zuo2; scanf("%d%d%d%d",&zuo1.x,&zuo1.y,&zuo2.x,&zuo2.y); gg=zuo

2016-08-28 14:47:42 525

原创 静态成员应用

#include   #include   using namespace std;   class Time   {     public:         Time(int=0,int=0,int=0);         void show_time();         void add_seconds(int );         void add_minutes(in

2016-08-28 14:45:57 692

原创 分数类的雏形

#include #include #include using namespace std; int GCD(int n,int m); class CFraction { public:     CFraction(int nu=1,int de=1);    void set(int nu=1,int de=1);     void input();

2016-08-28 14:45:23 384

原创 带武器的游戏角色

#include using namespace std; class attack { public:     attack(double t):         t(t){}     void   show()     {         if(t         {             cout             cout         }

2016-08-28 14:44:47 816

原创 IP地址

#include using namespace std; class IP { private:     union     {         unsigned char seg[4];         unsigned int address;     }; public:     IP(int=0,int=0,int=0,int=0);     void

2016-08-28 14:43:29 404

原创 友元函数

#include #include using namespace std; class Cpoint { private:     double x;     double y; public:     Cpoint(double xx=0,double yy=0):x(xx),y(yy){}     void setx(double xx);     void sety

2016-08-28 14:42:55 746

原创 一般时间函数

#include using namespace std; class Time { public:     Time(int h,int m,int s):hour(h),minute(m),sec(s) {}     void display1();    //display1是成员函数     friend void display2(Time &);  //display2

2016-08-28 14:42:17 406

原创 指向学生类的指针

#include using namespace std; class Student { public:     Student(int n,double s)     {         num=n;         score=s;     } void output(Student stu[],int i) {     cout } int g

2016-08-28 14:40:45 348

原创 长方柱类

#include using namespace std; class Bulk { public:     Bulk(double l=1,double w=1,double h=1)     {         length=l;         width=w;         height=h;     }     void get_value();     vo

2016-08-28 14:39:30 564

原创 工资读入数据

#include #include #include using namespace std; class Salary { public:     void read_date();     void add_salarys(int x);     void sort_salarys();     void show_salarys(); private:     do

2016-08-28 14:38:15 657

原创 工资

#include using namespace std; class Salary { public:     void set_salarys();     void add_salarys(int x);     void sort_salarys();     void show_salarys(); private:     double salarys[50];

2016-08-28 14:37:46 379

原创 人数不定的数组类

#include using namespace std; class Salary { public:     Salary(int n);     ~Salary();     void input_salary();     void show_salary(); private:     double *salary;     int number; }; Sa

2016-08-28 14:36:32 364

原创 简单的动态分配内存3

#include using namespace std; class AA { public:     AA(int i,int j)     {         A=i;         B=j;         cout     }     AA(AA &obj)     {         A=obj.A+1;         B=obj.B+2;    

2016-08-28 14:35:58 383

原创 简单的动态分配内存2

#include using namespace std; class MyClass { public:     MyClass(int x=0):i(x){cout     ~MyClass(){cout     void SetValue(int val)     {         i=val;     }     int GetVal()     {    

2016-08-28 14:35:27 401

原创 简单的动态分配内存

#include using namespace std; class A { public:     A()     {         cout     }     ~A()     {         cout     } }; class B {     A *p; public:     B()     {         cout      

2016-08-28 14:34:52 333

原创 摩托车继承自行车和机动车

#include #include #include using namespace std; enum vehicleStaus {rest, running};  //车辆状态:泊车、行进 class vehicle //车辆类 { protected:     int maxSpeed;       //最大车速     int currentSpeed;   //当前

2016-08-28 14:33:31 345

原创 点 圆 圆柱类族的设计

#include using namespace std; class Point { public:     Point(double xx,double yy)     {         x=xx;         y=yy;     }     void Show_point()     {         cout     } private:     d

2016-08-28 14:31:51 392

原创 银行系统

#include #include using namespace std; class Account { public: Account(string a,string b,double bal); virtual void saving(double a); virtual void getOutMoney(double a); virtual void

2016-08-28 14:28:57 403

原创 工资纳税系统

#include #include int main ( ) {     int Salary;//总工资     double Tax;//应交税金     double Include=0;//税后收入     double x=0;//超出1600元的部分     int a=0,i;         printf

2016-08-28 14:28:02 2203 2

原创 小学生算数系统

#include #include #include #include using namespace std; class Text { private:     string name;     int number;     int num;     int opera;     int score; public:     Text(string n,int

2016-08-28 14:27:29 831

原创 学生信息管理系统

#include #include #include struct student {     char code[20];//学号     char name[32];//姓名     int age;//年龄     char sex[3];//性别     char time[100];//出生日期     char add[32];//地址     char p

2016-08-28 14:19:16 615

空空如也

空空如也

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

TA关注的人

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