自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (4)
  • 收藏
  • 关注

原创 输入一个非负整数(十进制),输出此整数对应的二进制数

#include <stdio.h>void turn(int n){ if(n==0) { return; } else { turn(n/2); printf("%d",n%2); return; }}int main(){ int num; ...

2018-12-12 15:36:23 6004

原创 小平帮老师处理期末成绩时遇到了问题。他需要计算每个同学的平均成绩,并判断他们是否通过了期末考试不及格成绩(小于60)若都通过才能pass,若没通过要说明是哪几科未通过。因此他需要两个函数,一个求平均成

#include <iostream>#include <string>using namespace std;struct Student{ string number; int Chinese,Math,English;};int avery(Student& s){ return(s.Chinese+s.English+...

2018-12-05 20:41:40 1980

原创 重载流插入运算符 “《”和 流提取运算符“》”,使之能用于该矩阵的输入和输出。 输入 两个2行3列矩阵 输出 矩阵之和

#include <iostream.h>//using namespace std;class Matrix{public: Matrix(); friend Matrix operator+(Matrix &,Matrix &); friend ostream& operator<<(ostream&,...

2018-12-05 20:25:47 3244

原创 定义一个复数类Complex,重载运算符“+”,“-”,“*”,“/”,使之能用于复数的加、减、乘、除。运算符重载函数作为Complex类的成员函数。编写程序,分别求两个复数之和、差、积和商。

#include <iostream>#include <iomanip>using namespace std;class Complex{public: Complex(); Complex(double r,double i); Complex operator+(Complex &c2); Complex ope...

2018-12-05 19:20:18 946

原创 利用抽象基类来完成派生类dog和cat的定义,并利用指向基类的指针实现动态多态,输出不同类型动物的不同叫声。

#include <iostream>using namespace std; class animal //抽象基类---动物类{public: virtual void jiao()=0; //纯虚函数};//将程序需要的其他成份写在下面,只提交begin到end部分的代码//******************** begin *************...

2018-12-05 19:06:08 1276

原创 分别声明Teacher(教师)类和Cadre(干部)类,采用多重继承方式由这两个类派生出新类Teacher_Cadre(教师兼干部)类。要求: (1) 在两个基类中都包含姓名、年龄、性别、地址、电话

#include<string>#include <iostream>using namespace std;class Teacher{public: Teacher(string nam,int a,char s,string tit,string ad,string t); void display();protected: s...

2018-12-05 19:00:52 3497

原创 定义了Circle圆形类,在此基础上派生出Cylinder圆柱体类。 Circle圆形类定义如下: class Circle { public: Circle(double r):radius(r

#include <iostream>#include <iomanip>using namespace std;#define PI 3.14class Circle{public: Circle(double r):radius(r){ } double area(){return PI*radius*radius;} //圆面积protecte...

2018-12-05 18:20:08 8962

原创 下面的程序中,存在着两处语法错误。请改正错误,使程序按下面输入输出的规定运行。

#include <iostream>using namespace std;class A{private: int a,b;public: A(int aa, int bb) {a=aa; b=bb;} void printA() { cout<<"a: "<<a<<" b: "&lt

2018-12-05 17:30:57 3847

原创 如下的代码中,定义了Rectangle矩形类,在此基础上定义Bulk立方体派生类,请在(1)-(6)处填上需要的代码,使程序输出指定长、宽、高的立方体的体积。

#include <iostream>using namespace std;class Rectangle //矩形类{private:int length; //矩形的长和宽int width;public:Rectangle();Rectangle(int l,int w); //构造函数,l、w分别代表长和宽int getArea(); //求面积};...

2018-12-05 17:06:09 896

原创 Student类含有私有数据成员:num,name,sex,公有成员函数: 输入函数get_value()和输出函数display()。采用私有继承方式实现类Student1,增加数据成员:age,a

/* C++代码 */#include <iostream>#include <string>using namespace std;class Student{public: void get_value() { cin>>num>>name>>sex; } void display...

2018-12-05 16:37:22 3808

原创 Student类含有私有数据成员:num,name,sex,公有成员函数: 输入函数get_value()和输出函数display()。采用公用继承方式实现类Student1

#include <iostream>using namespace std;class Student{public: void get_value() { cin>>num>>name>>sex; } void display( ) { cout<<"...

2018-12-05 15:27:50 4409 1

commons-io-1.4

commons-io-1.4自己在使用没有错误可以放心使用 ,提高开发速度。

2018-07-10

dom4j-1.6.1

dom4j是一个十分优秀的JavaXML API,具有性能优异、功能强大和极其易使用的特点,同时它也是一个开放源代码的软件

2018-07-10

jre-7u9-windows-x64

jre-7u9-windows-x64.tar,在官网下载的各位可以放心使用。

2018-07-10

jdk-7u9-windows-x64

jdk-7u9-windows-x64 版本,官方下载,jdk不用多说了吧!

2018-07-10

空空如也

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

TA关注的人

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