- 博客(41)
- 收藏
- 关注
原创 心得体会
恍恍惚惚的大一即将结束,真的感觉到很迷茫,面对自己的学业,真的没有什么进步,相比高中,也许还有退步,后悔自己当初没有选择做一名学霸,优秀的人很多,圣人说::见贤思齐,可是感觉自己与别人相差很远,怎么能和优秀的人站在一起呢? 始终不敢相信,大学真正变优秀的仍然是学习,本想着一个人默默的经历大学中与中学不一样的地方,其实发现最大的不同就是没有了确定的目标,中学前无论怎样,都有着一个明确的目标,那就
2016-06-24 13:47:40
603
原创 oj 圆柱体
#include #include using namespace std; #define PI 3.1415926 class Cylinder { public: double area,V,basal_area,lateral_area; void calculate(int r,int h) { basa
2016-06-16 08:30:14
630
原创 复习题 奇数阶乘
#include using namespace std; int fac(int x); int main() { int n,m=0; cin>>n; m=fac(n); cout return 0; } int fac(int x) { if(x==0||x==1)
2016-06-15 20:20:23
1636
原创 排序
#include"iostream"using namespace std; template void Sort(T *p,int n) { int i,j,index; T t,min; for(i=0;i { min=*(p+i); index=i; f
2016-06-15 20:09:44
440
原创 排序模板 选择法排序
#include"iostream"using namespace std; template void Sort(T *p,int n) { int i,j,index; T t,min; for(i=0;i { min=*(p+i); index=i; f
2016-06-15 18:13:11
475
原创 复习题 第四周 不会的以前 参考答案
#include using namespace std; const double pi=3.1415926; double mysin(double x); double myabs(double x); int main( ) { cout cout return 0; } double mysin(dou
2016-06-15 18:04:44
617
原创 复习内容
#include using namespace std;int fac(int n){ int result=1; if(n throw string("Argument cannot be negative"); else if(n>12) throw n; while(n) {
2016-06-15 17:59:01
366
原创 输出星号
#include using namespace std;int main( ){ int i,j,n=6; for(j=1; j cout cout for(i=2;i { for(j=1; j cout cout for(j=1
2016-06-15 17:53:37
502
原创 对象的使用 ,用类处理学生信息
#include"iostream"using namespace std;class student{private: char name[10]; char ID[15]; int score;public: void input() { cin>>name>>ID>>score; voi
2016-06-14 14:47:04
446
原创 thisz指针联系
#include #include"cmath"using namespace std;class triangle{private: double a,b,c;public: void set(double ia,double ib,double ic) { this->a=ia;this->b=ib;this->c=ic;
2016-06-14 14:07:06
653
原创 数组作为数据成员 长方体类
#include using namespace std; class Bulk { public: //为什么一定要用构造函数 ? void get_value(); void display(); private: double lengh; double width; dou
2016-06-12 16:51:00
551
原创 指向类的指针 学生信息类的指针
#include using namespace std; class Student { public: Student(int n,double s):num(n),score(s) {}//构造函数 void display(); int getNum() //相当于内联函数 { ret
2016-06-12 16:36:49
587
原创 数组作为数据成员
sing namespace std; class Salary { public: void set_salarys( ); void add_salarys(int x); void sort_salarys(); void show_salarys( ); private: doub
2016-06-12 16:05:50
901
原创 第六周 分数类
#include #include using namespace std; class CFraction { private: int nume; int deno; public CFraction(int nu=0,int de=1); void output(int style=0); };
2016-06-12 15:45:31
572
原创 友元类 练习题
#include"iostream"using namespace std;#include"math.h"class A{private: int x;public: A(int a) { x=a; } friend class B;};class B{private: int
2016-06-08 10:42:53
554
原创 第五周 游戏类角色的设计
#include using namespace std;class Role{public: void eat(int z); void beAttack(); void setRole(string nam, int b); void attack(); void show();private: string na
2016-06-08 10:23:47
491
原创 第五周 三角形内联函数实现 并且判断是否能构成三角形
#include using namespace std; class triange { public: void setA(double ah) { a=ah; } void setB(double bh) { b=bh; } void setC(double ch) { c=ch;
2016-06-07 21:20:45
494
原创 改正 第五周 三角形类成员函数的实现
#include using namespace std;class triange{public: void set(double ah,double bh,double ch); double zhouchang(); double area();private: int a,b,c;};void triange::s
2016-06-07 08:51:35
632
原创 第五周 三角形类 成员函数的实现
#include using namespace std;class triange{public: void set(double ah,double bh,double ch); double zhouchang(); double area();private: int a,b,c;};void triange::s
2016-06-07 08:44:20
602
原创 给老师表白 求过
#include using namespace std;int main(){coutcoutcoutcoutcoutcoutcoutcoutcoutcoutcoutcoutreturn 0;}
2016-06-06 23:04:42
440
原创 视频中的 时钟类
#include using namespace std;class clock{public: void set_time(int Nh,int Nm,int Ns); void show_time();private: int hour;hour int mintue; int second;};void c
2016-06-06 22:52:02
309
原创 第四周 求四个数的最大公约数
#include using namespace std;int gcd(int a,int b);int gcds(int x,int y,int a,int b);int main(){ int a,b,c,d; int g; cin>>a>>b>>c>>d; g=gcds(a,b,c,d); cout r
2016-06-05 18:06:09
266
原创 第四周 猜数字游戏
#include"iostream"using namespace std;#include"ctime"#include"cstdlib"int main(){ int a; srand((unsigned)time(0)); a=1+rand()%1000; cout int z=0; for(;;)
2016-06-05 18:04:24
256
原创 第二周 胖子不说胖
#include using namespace std;int main(){ double tizhong,shenggao; double biaozhuntizhong; cin>>tizhong; cin>>shenggao; biaozhuntizhong=shenggao-100; cout
2016-05-24 13:02:17
298
原创 c
#include int main(){ int stringlen(char *); char str[100]; int len; gets(str); len=stringlen(str); printf("%d",len); return 0;}int stringlen(char *p){
2016-04-20 16:54:02
270
原创 c
#includeint main(){ int a[10]; int *p; p=a; int i; for(i=0;i { scanf("%d",&a[i]); } for(p=&p[9];p>=a;p--) { printf("%d ",*p);
2016-04-20 16:53:04
422
1
原创 c
#include void temp(int *p1, int *p2);int main( ){ int a,b; scanf("%d,%d",&a,&b); temp(&a,&b); printf("%d %d\n",a,b); return 0;}void temp(int *p1, int *p2){ i
2016-04-20 16:51:58
265
原创 c
#include int main(){ char str[100]; gets(str); char *ptr=str; void fuction(char *); fuction(ptr); return 0;}void fuction(char *ptr){ int i=0,j=0,k=0,z=0,d=0
2016-04-20 16:51:27
289
原创 c
#include void sort(int *a); int main() {int num[7],i;for(i=0;iscanf("%d",&num[i]);sort(num);return 0;}void sort(int *a){ int i,j; int temp; for(i=0;i { for(j
2016-04-20 16:50:48
232
原创 c
#include"stdio.h"struct staff{ char name[20]; int year; int gongzi;};int main(){ struct staff s[5]; int i; for(i=0;i { scanf("%s %d %d",s[i].name,&s[i].year,&s[i].gon
2016-04-20 16:49:57
266
原创 n
#include"stdio.h"int main(){ void sort (int *p,int m); int i,n; int *p,num[20]; scanf("%d",&n); for (i=0; i scanf("%d",&num[i]); p=&num[0]; sort(p,n);
2016-04-20 16:49:03
501
原创 用一般函数设计点类求两点之间的距离
/* *Copyright (c) 2016,烟台大学计算机学院 *All rights reserved. *文件名称:zyq.cpp *作 者:赵彦庆 *完成日期:2016年4月13日 *版 本 号:v1.0 * *问题描述:用一般函数设计点类求两点之间的距离 *输入描述: *程序输出:两点间距离 */ #inclu
2016-04-13 22:31:21
3709
原创 用友元函数设计点类求两点之间的距离
/* *Copyright (c) 2016,烟台大学计算机学院 *All rights reserved. *文件名称:zyq.cpp *作 者:赵彦庆 *完成日期:2016年4月13日 *版 本 号:v1.0 * *问题描述:用友元函数设计点类求两点之间的距离 *输入描述: *程序输出:两点间距离 */ #inclu
2016-04-13 22:28:37
7371
原创 用成员函数设计点类求两点之间的距离
/* *Copyright (c) 2016,烟台大学计算机学院 *All rights reserved. *文件名称:zyq.cpp *作 者:赵彦庆 *完成日期:2016年4月13日 *版 本 号:v1.0 * *问题描述:用成员函数设计点类求两点之间的距离 *输入描述: *程序输出:两点间距离 */ #include #inclu
2016-04-13 22:19:41
2669
原创 百钱百鸡 枚举法
#include using namespace std;int main(){ int x,y; int z; for(x=1;x { for(y=1;y { for(z=1;z { if(5*x+3*y+z/3==
2016-04-04 20:35:50
839
原创 1到m的倒数和
#include using namespace std;int main(){ double a=1.0; double sum=0.0; double m; int i; cin>>m; for(i=1;i { sum=(sum+a/i); } cout r
2016-04-04 20:34:07
634
原创 输出型号图片
#include using namespace std;int main(){ int i; for(i=0;i { for(int j=11;j>=1+2*i;j=j-1) { cout } cout } return 0
2016-03-29 20:28:29
335
原创 输出星号图
#include using namespace std;int main(){ int i,j; for(i=0;i { for(j=11;j>=1+2*i;j=j-1) { cout } cout } return 0;}
2016-03-29 20:18:58
737
原创 递归求阶乘
#include using namespace std;int main(){ int fib(int n); int n; cin>>n; cout return 0;} int fib(int n) { if(n==0||n==1) {
2016-03-29 19:22:54
417
原创 Fibnacci函数
#include"iostream"using namespace std;int fib(int n);int main(){ cout return 0;}int fib(int n){ if(n==1) { return 1; }else if(n==2) { return 1; }else {
2016-03-29 19:04:13
731
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人