自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 那些年,我们一起敲过的代码....

好吧,我一向认为我是对计算机很感兴趣的..可能是源自我从小就玩电脑游戏..直到现在大一结束...我发现我对计算机感兴趣的地方也就仅限于电脑游戏... 大一刚来,我是这样的满怀雄心壮志,学好专业课,这个好工作,赚大钱,买好车,娶漂亮媳妇!!! 一段时间后,我是这样的C++挺有意思的,流程图神马都很简单,以前都学过...敲几行代码就能弄出几排小星星排列图形... 再

2012-06-11 19:19:34 1365 1

原创 第十七周报告

#include #include #include#includeusing namespace std; class Student { public: Student(); Student(string name,int C_plus_plus,int Math,int English,int All_score,double Average

2012-06-11 19:17:25 1106

原创 第十六周 任务三

#include #include #include#includeusing namespace std; class Student { public: Student(); Student(string name,int C_plus_plus,int Math,int English,int All_score,double Average

2012-06-04 18:48:34 910

原创 第十六周 任务二

#include #include #include#includeusing namespace std; class Student { public: Student(); Student(string name,int C_plus_plus,int Math,int English,int All_score,double Average

2012-06-04 18:27:47 844

原创 第十六周 任务一

#include #include using namespace std; class Salary { public: void ordered_salary_add(); void ordered_salary(); void input_salary(); void ordered_salary_txt(

2012-06-04 18:19:16 811

原创 第十五周 任务一

MyTriangle.hclass Triangle{public: Triangle(){a=1;b=1;c=1;} Triangle(double x, double y, double z) {a=x; b=y; c=z;} double area(void); double perimeter(void);private: double a,b,c;

2012-05-28 19:17:18 652 1

原创 第十四周 任务一

#includeusing namespace std;class MyArray{private: int *arr; //用于存放动态分配的数组内存首地址 int size; //数组大小public: MyArray(int sz=50); MyArray(int a[],int sz); //由一个内置类型的数组初始化 MyArray(const

2012-05-21 18:37:37 569

原创 第十三周 任务二

#include "iostream"#includeusing namespace std;class Animal{public: virtual void cry() {cout<<"不知哪种动物,让我如何学叫?"<<endl;}};class Mouse :public Animal{public: void cry() {cout<<"我叫Je

2012-05-21 18:03:19 516

原创 第十三周 任务一

#include using namespace std;class Vehicle {public: void run() const { cout << "run a vehicle. "<<endl; } //(2) run()为虚函数}; class Car: public Vehicle {public: void run() con

2012-05-14 18:46:37 534 1

原创 第十二周 任务二

#include #include#include using namespace std;class Teacher{public: Teacher(string nam,int Age,int Sex,char *Department, int phone,string title1); ~Teacher( ); void displa

2012-05-07 19:07:03 870

原创 第十二周 任务一

#include#includeusing namespace std;class Student //(1)修改student类中各数据成员和成员函数的访问限定符,并观察发生的现象{public: Student(int n,string nam,char s) ; void show(); ~Student( ){ } protected:

2012-05-07 18:28:00 921 1

原创 第十周 任务二

#include #include #include //setw:设置输出数据的宽度,使用时应#include using namespace std;class CPerson {protected: char *m_szName; char *m_szId; int m_nSex;//0:women,1:man int m_nAge;pu

2012-04-23 18:53:28 985

原创 第十周 任务一

#include #include using namespace std; class Point //定义坐标点类 { public: double x,y; //点的横坐标和纵坐标 Point(){x=0;y=0;} Point(double x0,double y0) {x=x0;

2012-04-23 18:31:20 530

原创 第九周 任务四

#include using namespace std;class Douary{public: Douary(int m, int n);//构造函数:用于建立动态数组存放m行n列的二维数组(矩阵)元素,并将该数组元素初始化为 Douary(const Douary &d); ~Douary(){delete [] Array;} //析构函数:用于释放动态数组所占用的存储空

2012-04-22 23:20:39 470

原创 第九周 任务三

#include using namespace std; class CFraction { private: int nume; // 分子 int deno; // 分母 public: CFraction(int nu = 1,int de = 2); //构造函数,初始化用

2012-04-16 19:17:55 686

原创 第九周 任务二

#includeusing namespace std;class Complex { public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Compl

2012-04-16 18:49:32 703

原创 第九周 任务一

#include using namespace std;class CTime { private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second;

2012-04-16 18:21:41 845

原创 第八周 任务二

#include using namespace std; class CTime { private: unsigned short int hour; // 时 unsigned short int minute; // 分 unsigned short int second; // 秒 public:

2012-04-09 19:14:40 626

原创 第八周 任务一

一、#include using namespace std; class Complex { public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); C

2012-04-09 18:43:05 848 1

原创 第七周 任务三

#include using namespace std; template class Complex { public: Complex( ){real=0;imag=0;} Complex(numtype r,numtype i){real=r;imag=i;} Complex complex_a

2012-04-02 19:14:23 835 1

原创 第七周 任务一

#include using 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

2012-04-02 18:51:01 376

原创 第六周实验报告 任务三

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

2012-03-28 18:46:24 689 2

原创 第五周实验报告 任务三

/* (程序头部注释开始) * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名称: * 作 者:韩冰 * 完成日期: 2012 年 x 月 x

2012-03-28 18:37:34 434

原创 第五周实验报告 任务二

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:分数类 * 作 者:韩冰 * 完成日期: 2012 年 x 月 x 日*

2012-03-28 18:35:37 382

原创 第五周实验报告 任务一

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:类的初始化 * 作 者:韩冰 * 完成日期: 2012 年 x 月

2012-03-28 18:33:21 362

原创 第四周实验报告 任务三

#include #include using namespace std; class NaturalNumber {private: int n; public: void setValue (int x);//置数据成员 n 的值,要求判断是否是正整数 int getValue(); //返回私有数据成员 n的值

2012-03-28 18:28:21 382

原创 第四周实验报告 任务一

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:三角形类 * 作 者:韩冰 * 完成日期: 2012 年 月 日*

2012-03-28 18:24:35 352

原创 第六周 任务二

#includeusing namespace std;class A{private: int a;public: A(){a = 0;} A(int aa):a(aa){} void show(); };void main(){ A *p; p = new A(1);

2012-03-26 18:37:11 571

原创 第六周 任务一 方法2

#include using namespace std;class C{private: int x;public: C(int x){this->x = x;} int getx()const{return x;}};void main(){ const C c(5); cout<<c.getx()<<endl; system("paus

2012-03-26 18:25:57 412

原创 第六周 任务一 方法1

#include using namespace std;class C{private: int x;public: C(int x){this->x = x;} int getx(){return x;}};void main(){ C c(5); cout<<c.getx()<<endl; system(

2012-03-26 18:21:00 462

原创 第三周任务三

#include using namespace std;class Time{public: void set_time(); void show_time(); void change_time(); void add_seconds(int n); void add_minutes(int n); void add_hours(int n);pri

2012-03-05 18:54:21 893 3

原创 任务三

/*(3‐1)输入一行字符,统计其中有多少个单词。每两个单词之间以空格(可能多个)隔开,或者由标点符号(只考虑  , . ; ? !共 5 种)隔开。  如输入: How old are your?   I am    20.  输出:There are 7 words in the line.   【知识点:字符数组】 *  算法说明:  */ #include

2012-03-05 18:35:35 993

原创 输出组合数

/*(2‐1)组合数求解公式为C = 。编程序输入 m,n,输出组合数,要求用自定义mnmn!(.- )!函数实现求阶乘。  *  算法说明:  #include using namespace std;long fac(int n){ long f; if(n==0||n==1)f=1; else f=fac(n-1)*n; return f;

2012-03-05 18:22:37 672

原创 C++作业 十进制转换为二进制

课外自学要求:自抽时间,全面复习完第1、2 章内容,目标是在阅读程序和编写程序时,不会在变量、常量、表达式、运算符等方面出现障碍,为全面复习打基础。任务一/*(1‐1)编写递归函数将十进制数转换成二进制数输出。* 算法说明:*/#include using namespace std;void d2b(int n){ if(n  cout else

2012-02-27 19:25:37 859

空空如也

空空如也

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

TA关注的人

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