- 博客(13)
- 收藏
- 关注
原创 a
#include using namespace std;class Rectangle //矩形类{private: int length; //矩形的长和宽 int width;public: Rectangle(); Rectangle(int l,int w); //构造函数,l、w分别代表长和宽 int getArea
2014-06-24 15:02:16 805
原创 处理成绩
#include using namespace std;class Student{public: void setnum(); void setscore(); void avescore(); void compare(); void display();private: int num; do
2014-06-17 14:23:15 730
原创 最大数的输出
#include using namespace std;class Q{public: void set_value(); double get_Max();private: int n; int a[100];};void Q::set_value(){ cin>>n; for(int i=0; i<n
2014-06-11 19:54:58 1025
原创 C++结构体之统计最高最低分
#include#includeusing namespace std;struct Student{ string name; double score;};int main(){ int i=0; Student stu[5],ma,mi; ma.score=0,mi.score=100; while(ci
2014-06-11 19:39:41 909
原创 虚数 计算圆形面积
#include #include using namespace std;class Shape{ public: virtual double area()=0;};class Circle:public Shape{ public: Circle(double r):R(r){} virtual double ar
2014-06-11 19:20:35 1054
原创 抽象基类
#include #include using namespace std;class Shape{ public: virtual double area()=0;};class Circle:public Shape{ public: Circle(double r):R(r) {}
2014-06-11 19:02:46 1114
原创 继承与组合
#include #include using namespace std;class BirthDate{public: BirthDate(int,int,int); void display(); void setbirthday(int,int,int);private: int year; int month;
2014-06-10 14:55:08 652
原创 oj 多元继承
Teacher::Teacher(string nam,int a,char s,string tit,string ad,string t):name(nam),age(a),sex(s),title(tit),addr(ad),tel(t){}void Teacher::display(){ cout cout cout cout co
2014-06-10 14:17:44 858
原创 oj 输入 输出保护继承
Comlex Complex::operator+(Complex &c1p){ return Complex(real+c1.real,imag+c1.imag);}Complex Complex::operator+(double&d){ Complex c; c.real=real+d; c.imag=imag; return
2014-06-10 14:17:05 700
原创 用文件保存的学生名单
/** 程序的版权和版本声明部分:* Copyright (c) 2013, 烟台大学计算机学院* All rights reserved.* 文件名称:test.cpp* 作 者:初瑞* 完成日期:2014年 6月 10日* 版 本 号:v12.1* 输入描述:无* 问题描述:。* 程序输出:* 问题分析:略* 算法设计:略*/
2014-06-10 08:49:09 757
原创 第十五周 项目1-工资数据的输入(文件输入,文件输出)
/*烟台大学计算机学院学生*All right reserved.*文件名称:工资数据的输入*作者:初瑞*完成日期:2014年6月3日*版本号:v1.0*对任务及求解方法的描述部分:工资数据的输入*我的程序:*/#include #includeusing namespace std;int main( ){ double salarys[
2014-06-03 14:58:10 749
原创 第十五周 项目1-工资数据的输入(文件输入)
/*烟台大学计算机学院学生*All right reserved.*文件名称:工资数据的输入*作者:初瑞*完成日期:2014年6月3日*版本号:v1.0*对任务及求解方法的描述部分:工资数据的输入*我的程序:*/#include #includeusing namespace std;int main( ){ double salarys[
2014-06-03 14:49:18 768
原创 第十三周 项目1-工资数据的输入(手动输入)
/*烟台大学计算机学院学生*All right reserved.*文件名称:工资数据的输入*作者:初瑞*完成日期:2014年6月3日*版本号:v1.0*对任务及求解方法的描述部分:工资数据的输入*我的程序:*/#include using namespace std;int main( ){ double salarys[500],t;
2014-06-03 14:34:31 744
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人