自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 十六周实验一

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:* 作    者:      彭志康                   * 完成日期:    * 版 本 号:        * 对任务及求解方法的描述部分* 输入描述:* 问题

2012-06-06 18:51:03 587 1

原创 十五周实验3.1

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:* 作    者:      彭志康                   * 完成日期:    * 版 本 号:        * 对任务及求解方法的描述部分* 输入描述:* 问题

2012-05-30 13:41:53 849

原创 十三周实验二

2.2#include "iostream"#includeusing namespace std;class Animal{public: virtual void cry() = 0;};class Mouse :public Animal{public: void cry() {cout<<"我叫Jerry,是一只老鼠,我的叫声是:吱吱吱!"<<endl;} Mo

2012-05-16 19:08:26 423 2

原创 十三周实验一

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

2012-05-16 18:54:17 537

原创 十二周实验一

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

2012-05-08 21:46:01 359

原创 第十周实验二

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称: CPoint.cpp    * 作    者:彭志康   * 完成日期:    * 版 本 号:        #include #include #include

2012-04-25 18:18:24 361 1

原创 第十周实验一

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称: CPoint.cpp    * 作    者:彭志康   * 完成日期:    * 版 本 号:       #include #include using name

2012-04-25 18:14:49 283

原创 第九周实验三

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

2012-04-18 18:39:19 585

原创 第九周实验二

#include//using namespace std;class CTime{private: /*unsigned short */int hour; /*unsigned short */int minute; /*unsigned short */int second; public: CTime(int h =

2012-04-18 18:34:09 498

原创 第九周实验一

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:定义一个复数类重载运算符+、-、*、/,使之能用于复数的加减乘除。* 作    者:彭志康                         * 完成日期:     * 版 本 号:

2012-04-18 18:31:40 530

原创 第八周实验一

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

2012-04-11 19:17:43 345 1

原创 第七周实验二

/* (程序头部注释开始)* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称: CPoint.cpp    * 作    者:彭志康   * 完成日期:    * 版 本 号:       * 对任务及求解方法的描述部分* 输入描述:使用成员函数、友元函数和一般

2012-04-04 08:14:35 696

原创 第七周实验一

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

2012-04-04 07:45:39 543

原创 第六周实验三

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

2012-03-28 19:29:44 332

原创 第六周实验二

一,用指针访问对象class A { private: int a; public: A() {a=5;} A(int aa) : a(aa){}; //定义构造函数,用参数aa初始化数据成员a void display() { cout << a << endl; } }; int

2012-03-28 19:20:41 323

原创 第六周实验一

错误代码class C { private: int x; public: C(int x){this->x = x;} int getX(){return x;} }; void main() { const C c(5); cout<<c.getX(); system("

2012-03-28 19:11:40 369

原创 第五周实验三

#include using namespace std; class Box { public: Box(); Box(int,int,int); int volume(); int area(); void lwh(); private:

2012-03-21 20:01:34 667

原创 第五周实验一

#include #include using namespace std; class Triangle {public: Triangle(float x=1,float y=1,float z=1);//声明构造函数时指定默认参数 float perimeter(void);//计算三角形的周长

2012-03-21 19:58:47 470

原创 第四周实验二

#include #include"Time.h" using namespace std; int main( ) { Time t1; Time &t2=t1; t1.set_time( ); t1.show_time( );

2012-03-14 18:17:30 263

原创 第二周实验四

#include #include "string.h" using namespace std; void main() { char string[81]; int i,num=0,word=0; cout<<"请输入要查询的英文语句!"; gets(string); for(i=0;

2012-02-29 20:18:52 310

原创 第二周实验报告三

#include using namespace std; long fac(int n) { if(n==0 || n==1) return 1; else return n*fac(n-1); } int main() { int m,n; double sum;

2012-02-29 20:16:47 308

原创 第二周实验二

#include using namespace std; int main() { int i=0,n,a[50]; cin>>n; while(n>0) { a[i]=n%2; n=n/2; ++i; } for(int j=i-1;j>=0

2012-02-29 20:12:20 574

原创 第二周实验一

#include using namespace std; void d2d(int n) { if(n==0) cout<<0; else { d2d(n/2); cout<<n%2; } } int main() { int a;

2012-02-29 20:07:22 383

原创 十八周实验

实验目的:学会指针访问字符数组 实验内容:从字符数组中取出指定位置开始的子符串 * 程序头部注释开始 * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名称:指针字符串复制 * 作 者: 彭志康

2012-02-23 06:49:41 310

原创 十七周实验

实验目的:揭开关于你生世的秘密 实验内容:简单的处理日期* 程序头部注释开始* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生* All rights reserved.* 文件名称: * 作 者: 彭志康 * 完成日期:

2012-02-23 06:48:23 640

原创 十七周实验

运用结构体对数据进行处理源程序:#include#include#include#includeusing namespace std;void show_score(int num);void cin_score(int num);void get_max(int num);void array_px(int num);struct

2012-02-23 06:43:29 460

原创 十七周实验

第十七周报告2运用链表进行排序#include #include#include#include using namespace std;void show_score(int num);//输出成绩void cin_score(int num);//从文件得到成绩;//定义结构体;struct Student{ char n

2012-02-23 06:42:13 287

原创 十六周实验

实验目的:学会使用循环控制语句解决实际问题实验内容:用循环控制语句编写程序,完成表达式的计算* 程序头部注释开始* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生* All rights reserved.* 文件名称:统计学生成绩                            * 作    者: 彭志康

2012-02-23 06:39:32 230

原创 十六周实验

实验目的:学会利用指针解决问题实验内容:求出一个数所有的奇数因子* 程序头部注释开始* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生* All rights reserved.* 文件名称:利用指针求奇因数                             * 作    者:   彭志康

2012-02-23 06:37:17 563

原创 十六周实验

实验目的:学会冒泡排序算法实验内容:实现冒泡排序算法,并将之定义为一个函数,其中参数是指向数组的指针变量* 程序头部注释开始* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生* All rights reserved.* 文件名称:运用指针进行冒泡排序                             * 作    者:

2012-02-23 06:36:05 265

原创 十五周实验

实验目的:学会ASCII文件的操作实验内容:从文件中读入数据,排序并输出到另外一个文件中* 程序头部注释开始* 程序的版权和版本声明部分* Copyright (c) 2011, 烟台大学计算机学院学生* All rights reserved.* 文件名称:调用文件                             * 作    者:114-4 彭志康

2012-02-23 06:34:33 293

空空如也

空空如也

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

TA关注的人

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