- 博客(12)
- 收藏
- 关注
原创 第十周任务二
#include #include #include //setw:设置输出数据的宽度,使用时应#include using namespace std;class CPerson {protected:char *m_szName;char *m_szId;int m_nSex;//0:women,1:manint m_nAge;public:CPerson(char
2012-04-25 16:46:26 404 1
原创 第十周任务一
#include#includeusing namespace std;class Point //定义坐标点类{public: double x,y; //点的横坐标和纵坐标 Point(){x=0;y=0;} Point(int x0,int y0) {x=x0; y=y0;} void PrintP(){cout<<"Point:("<<x<<","<<y<<")";}
2012-04-23 21:09:09 356
原创 第九周任务五
#include using namespace std;class CEquation{private: double a; // 未知数系数 double b; // 常数项 char unknown; // 未知数的符号public: CEquation(double aa=0,double bb=0); friend istream &operator
2012-04-18 19:01:35 350
原创 第九周任务三
#include using namespace std; class CFraction { private: int nume; // 分子 int deno; // 分母 public: CFraction(int nu=0,int de=1):nume(nu),deno(de){} void simplify();
2012-04-17 21:59:45 435
原创 第九周任务二
#include using namespace std;class CTime{private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second; // 秒public: CTime(int h=0,int m=0,int s=0); vo
2012-04-16 20:46:20 543
原创 第九周任务一
#includeusing namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Complex operator-(Complex &c2); Comple
2012-04-16 20:38:44 716
原创 第八周任务三
#include using namespace std;class CFraction{private: int nume; int deno;public: CFraction(int nu=0,int de=1):nume(nu),deno(de){} void simplify(); void display(); CFraction operator +(
2012-04-11 20:42:19 655 1
原创 第八周任务二
#include using namespace std; class CTime { private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second; // 秒 public: CTime
2012-04-10 20:29:16 554
原创 第八周任务一
#includeusing namespace std;class Complex{public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Complex operator-(Complex &c2); Comple
2012-04-09 22:02:11 371
原创 第七周任务三
/* (程序头部注释开始) * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名称: * 作 者:李鲁超 * 完成日期: 2012
2012-04-04 19:15:26 591
原创 第七周任务二
#include #include using namespace std;class CPoint{private: double x; double y;public: CPoint ( double xx = 0 , double yy = 0 ): x ( xx ), y ( yy ){} double distance1 ( CPoint & );//
2012-04-04 19:08:29 556 1
原创 第七周任务一
#includeusing namespace std;class Time{public: Time(int=0,int=0,int=0); void show_time( ); //根据is_24和from0,输出适合形式-20:23:5/8:23:5 pm/08:23:05 pm void add_seconds(int); //增加n秒钟 void add_minutes(
2012-04-03 20:41:25 266
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人