C++作业
文章平均质量分 61
Guo2557936113
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++ 第二次上机实验(作业)
T1 定义 class Time : 代码: #include using namespace std; class Time { public: void setTime(); void showTime(); void add_a_sec();//增加1秒钟 void add_a_minute();//增加1分钟 void add_an_hou原创 2016-03-27 18:02:21 · 695 阅读 · 0 评论 -
C++ 第五次作业
#include #include using namespace std; class Person { string name; // 姓名 int age; // 年龄 public: Person() {} void setname(string na) { name=na; } void setage原创 2016-05-06 10:40:40 · 457 阅读 · 0 评论 -
第三次上机作业
#include #include using namespace std; class CPoint { private: double x; // 横坐标 double y; // 纵坐标 public: CPoint(double xx=0,double yy=0):x(xx),y(yy){} double display1(CPoint原创 2016-06-01 22:06:33 · 352 阅读 · 0 评论 -
C++ 第四次实验 作业
【项目1 - 龙三】 请在下面程序的横线处填上适当内容,以使程序完整,并使程序的输出为: Name: 龙三 Grade: 19 #include #include using namespace std; class Person{ public: Person(string s){ name=s; } void display( ){原创 2016-05-06 10:57:00 · 529 阅读 · 0 评论 -
第七次作业
定义一个有10个的数组a,输出数组a中所有的奇数的阶乘和和偶数的阶乘和。其中将奇偶数的判断和阶段的计算定义为函数。 #include using namespace std; int jc(int x); //阶乘计算 bool jo(int x); //奇偶数的判断 int main() { int a[10]={10,9,8,7,6,5,4,3,2,1}; int原创 2016-06-05 23:03:28 · 657 阅读 · 0 评论 -
c++第6次实验 作业
一: //【项目1:输出星号图】编程序输出01.cpp #include using namespace std; int main() { int i,j,k; for(i=1;i<=5;i++) { k=1; while(k<=6-i) { cout<<" "; k++; } if(i>1)cout<<"*"; j=1; while(j<=2原创 2016-06-01 22:07:38 · 541 阅读 · 0 评论
分享