摘要: 对于选作部分,还没做好= =,请谅解QWQ 阅读全文
posted @ 2018-06-20 22:36 卡斯兰娜樱 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 第一道题目的话,我是把A,B,C芯片当作基类,之后共同派生出来一个派生类(和A,B,C是一个的派生类不一样)(理解问题把) 第二条:: 第三题:: 中间是把iFraction和iFraction中的convertF搞得有点混:: 另外,分数的输出格式不怎么好= =,不会搞。。 阅读全文
posted @ 2018-06-07 18:37 卡斯兰娜樱 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 首先,我想说这是自己做的最烂的一次实验了。。。 发现自己对于new 语句还是不熟悉(要花点时间搞一下了) 这里,虽然Devc是可以跑出来的,但是感觉是定义一个指针p的时候,就要让指针有指向,而不是直接对指针的内容赋值。 这里书上一开始是没有第{delete p }的,个人感觉,申明了一个空间,之后好 阅读全文
posted @ 2018-05-23 20:23 卡斯兰娜樱 阅读(114) 评论(0) 推荐(0) 编辑
摘要: // 类graph的实现 #include "graph.h" #include using namespace std; // 带参数的构造函数的实现 Graph::Graph(char ch, int n): symbol(ch), size(n) { } // 成员函数draw()的实现 // 功能:绘制size行,显示字符为symbol的指定图形样式 // ... 阅读全文
posted @ 2018-04-23 22:40 卡斯兰娜樱 阅读(130) 评论(2) 推荐(0) 编辑
摘要: 书上例题= = 运行结果: 书上例题: 阅读全文
posted @ 2018-04-08 22:19 卡斯兰娜樱 阅读(92) 评论(1) 推荐(0) 编辑
摘要: #include<iostream>#include<math.h>using namespace std;int main(){ int a,j,i=1; cout<<"包含了100之内的质数"<<endl; while(i<=100) { a=sqrt(i); for(j=2;j<=a;j++) 阅读全文
posted @ 2018-03-25 22:00 卡斯兰娜樱 阅读(127) 评论(6) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(){ int i,j,k,n=0; for(i=0;i<5;i++)//第一个球 { for(j=0;j<5;j++)//第二个球 { if(i!=j)//第一个和第二个球不一样,再进行 { for(k=0 阅读全文
posted @ 2018-03-21 20:11 卡斯兰娜樱 阅读(77) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cstdlib> using namespace std;int main(){ int i=1+rand()%100; int a=101; while(a!=i) { cin>>a; if(a<i) { cout<<"少了"<<endl; c 阅读全文
posted @ 2018-03-21 20:10 卡斯兰娜樱 阅读(96) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<math.h>using namespace std;int main(){ int a,j,i=1; cout<<"包含了100之内的质数"<<endl; while(i<=100) { a=sqrt(i); for(j=2;j<=a;j++) 阅读全文
posted @ 2018-03-21 20:08 卡斯兰娜樱 阅读(59) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(){ char a=100; cout<<"Menu:A(dd) D(elete) S(ort) Q(uit) ,Select one: "<<endl; cin>>a; if(a!=81) { switc 阅读全文
posted @ 2018-03-21 20:07 卡斯兰娜樱 阅读(62) 评论(0) 推荐(0) 编辑