- 博客(17)
- 收藏
- 关注
原创 作业6.14
#include using namespace std;class container{protected: double radius;public: container(double radius1) {radius=radius1;} virtual double surface_area()=0; virtual double volume()=0;};cla
2015-06-30 15:37:12 247
原创 作业6.12
#include using namespace std;class area_c1{protected: double height; double width;public: area_c1(double r,double s) {height=r; width=s;} virtual double area()=0;};class rectangle:publ
2015-06-30 14:51:57 306
原创 5.19
#include#includeusing namespace std;class base{public: base(string name1,string age1) { name= name1; age=age1; cout<<"姓名:"<<name<<endl; cout<<"年龄:"<<age<<endl; }private: string name;
2015-06-04 12:53:13 269
原创 5.18
#include #include using namespace std;class person{public: person(string name1,string no1) { name=name1; no=no1; } void print() { cout<<"姓名"<<name<<endl; cout<<"编号"<<no<<endl; }pri
2015-06-04 12:49:48 254
原创 4.22
#include #include #include using namespace std; class Location{ public: Location(double i,double j) { x=i; y=j; } double Getx() {
2015-04-25 14:38:08 254 1
原创 120页第四题
#include#includeusing namespace std;class student{public: student(int s) { score=s; } void account(int j); static void sum(); static void average();private: int score; static int total_
2015-04-25 14:29:04 302 1
原创 120页第三题
#include#include#includeusing namespace std;class Location{public: Location(double i,double j) { x=i; y=j; } double Getx() { return x; } double Gety() { return y; } double dist
2015-04-25 11:40:27 295 1
原创 前四章节课堂小测
题目: 定义一个学生类和一个老师类。学生类有学号、姓名、两门或多门成绩数据,老师有职工号和姓名数据。学生对象能查看自己成绩信息,教师能对学生成绩进行录入。编程实现初始化一个或多个学生信息,初始化一个老师信息。实现学生成绩的输入和相关学生的成绩查看功能。#include#includeusing namespace std;class student;class teacher
2015-04-22 13:32:29 363 1
原创 作业4.21
#include#includeusing namespace std;class Student{public: Student(string name1,int number1,float score1); void show(); void show_count_sum_ave();private: string name; int number; float
2015-04-15 16:27:25 288 1
原创 作业4.19 4.20
#include using namespace std; class book {public: book(int q,int p) { qu=q; price=p; } void show() { cout<<qu*price<<endl; }private: int qu,price;};int main(){ book b
2015-04-15 16:02:11 379 1
原创 作业4.17 4.18
#include using namespace std; class Student { public: Student(int n,int s) { no=n; score=s; } static void show(Student q) {
2015-04-15 15:42:40 439 1
原创 3.24作业
#include using namespace std; class Date { public : void printDate(); void GetYear(); void GetMonth(); void GetDay(); void SetDate(int Y,int m,int d); private :
2015-04-08 13:58:58 310 1
原创 3.23作业
#includeusing namespace std;class Cylinder{public:Cylinder(double r,double h);void vol();private:double radius;double hight;double v;};Cylinder::Cylinder(double r,double
2015-04-08 13:40:53 311 1
原创 2.30(作业)
2.30#include#includeint sroot(int i){ return sqrt(i);}long sroot(long l){ return sqrt(l);}double sroot(double d){ return sqrt(d);}int main(){ int i=4;
2015-04-01 17:05:41 309 1
原创 学生类
#include using namespace std; class student {public: void show_student () { cout cout cout } void set_student (char*p,double a,double
2015-04-01 17:03:43 358 1
原创 [3.22]作业
#include using namespace std; class Circle { public: Circle(double r) { radius=r; } double area() { return (3.14*radius*radius);
2015-04-01 16:57:32 350 1
原创 2.29 (作业)
2.29#include using namespace std; int main() { int i; int *f=new int[20]; f[0]=1; f[1]=1; cout for(i=2;i { f[i]=f[i-1]+f[i-2]; cout } co
2015-04-01 15:05:46 297 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人