- 博客(11)
- 收藏
- 关注
原创 课程设计:ATM机模拟系统
#includeusing namespace std;class System;class money{ //定义钱类public: money(double b) {balance=b;} void check_balance(); //查询余额函数 void save_money();
2015-07-05 16:31:16 1741
原创 4.22
#include#includeusing namespace std;class dot{public: dot(double a,double b); friend double dist(dot &,dot &); void disp();private: double x; double y;};dot::dot(double a, double b){ x=a
2015-06-04 23:25:45 293
原创 4.21
#include#includeusing namespace std;class student{public: student(int nu,string na,double m); void disp();private: int number; string name; double mark; static int people; static double su
2015-06-04 22:19:08 316
原创 4.19&&4.20
#includeusing namespace std;class book{public: book(int q); void disp();private: int qu; int price;};book::book(int q){ qu=q; price=10*q;}void book::disp(){ cout<<"qu*price="<<qu*pric
2015-06-04 21:42:26 330
原创 4.18
#includeusing namespace std;class exam{public:exam(int n,float s){number=n;score=s;}void max(exam *ob){ float big=ob->get_sco();int i;for(i=1;i<6;i++){ob++;if(bigget_sco())big=ob->get
2015-05-23 20:00:12 266
原创 4.17
#includeusing namespace std;class exam{public: exam(int n,int s) { number=n; score=s; } void get_x() { cout<<number<<' '<<score<<endl; }private: int number; int score;};int main()
2015-05-06 16:52:21 321 1
原创 3.24
#includeusing namespace std;class Date{ int year; int month; int day;public: void printDate() { cout<<"日期是:"<<year<<"年"<<month<<"月"<<day<<"日"<<endl; } void GetYear() { cou
2015-04-22 19:10:33 413 1
原创 3.23
#includeusing namespace std;class cylinder{double r;double h;double vol;public:void input(){cout<<"请输入圆柱体的半径"<<endl<<"r=";cin>>r;cout<<"请输入圆柱体的高"<<endl<<"h=";cin>>h;}void vol_out(){vo
2015-04-22 16:52:20 264 1
原创 3.22
#includeusing namespace std;class Circle { double r; double ar;public: void radius_input() { cout<<"请输入圆的半径"<<endl; cin>>r; } void c_area_display() { ar=3.14*r*r; cout<<"该圆的面积是:"<<"
2015-04-22 16:51:20 312 1
原创 第二章 2.29
#include #includeusing namespace std; void main() { int *Fb=new int[20]; int *i= new int(2); Fb[0]=Fb[1]=1; cout<<setw(5)<<Fb[0]<<setw(5)<<Fb[1]; do { Fb[*i]=Fb[*i-1]+Fb[*i-2]; cout<<set
2015-04-02 09:43:52 372 1
原创 第二章 2.30
#include#includeusing namespace std;int sroot(int i){ return sqrt(i);}long sroot(long l){ return sqrt(l);}double sroot(double d){ return sqrt(d);}int main(){ int i=12; long l=123456;
2015-04-02 09:42:09 368 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人