• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
gjsgjs
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 19 20 21 22 23 24 下一页

2023年5月15日

第十五天打卡
摘要: 定义一个Animal类,成员包括:(1)整数类型的私有数据成员m_nWeightBase,表示Animal的体重;(2)整数类型的保护数据成员m_nAgeBase,表示Animal的年龄;(3)公有函数成员set_weight,用指定形参初始化数据成员m_nWeightBase;(4)公有成员函数g 阅读全文
posted @ 2023-05-15 20:10 三月九 阅读(33) 评论(0) 推荐(0)
 
 

2023年5月11日

第十四天打卡
摘要: 以点类Point及平面图形类Plane为基类公有派生圆类Circle,再以圆类Circle及立体图形类Solid为基类公有派生球类Sphere,main(void)函数完成对球类Sphere的测试。 #include <iostream> using namespace std; //点类Point 阅读全文
posted @ 2023-05-11 21:43 三月九 阅读(17) 评论(0) 推荐(0)
 
 

2023年5月10日

第十三天打卡
摘要: 以平面图形类Plane为基类公有派生三角形类Triangle,main(void)函数完成对其的测试。 题目: #include <iostream> #include<cmath> using namespace std; //点类Point class Point{ private: doubl 阅读全文
posted @ 2023-05-10 22:13 三月九 阅读(23) 评论(0) 推荐(0)
 
第十二天打卡
摘要: 以点类Point及平面图形类Plane为基类公有派生圆类Circle,main(void)函数完成对其的测试。 #include <iostream> using namespace std; //点类Point class Point{ private: double x; double y; p 阅读全文
posted @ 2023-05-10 00:24 三月九 阅读(23) 评论(0) 推荐(0)
 
 

2023年5月9日

第十一天打卡
摘要: 定义一个整数加法器类Adder,对其重载运算符“+”、“++”,main(void)函数完成对其的测试。 #include <iostream> using namespace std; /*请在这里填写答案*/ //主函数 int main(void){ int x; Adder a1,a2(a1 阅读全文
posted @ 2023-05-09 00:02 三月九 阅读(16) 评论(0) 推荐(0)
 
 

2023年5月4日

第十天打卡
摘要: 补充下列代码,使得程序的输出为:A:3A:15B:53155 类和函数接口定义: 参见裁判测试程序样例中的类和函数接口。 裁判测试程序样例: #include <iostream> using namespace std; class CMyClassA { int val; public: CMy 阅读全文
posted @ 2023-05-04 21:51 三月九 阅读(22) 评论(0) 推荐(0)
 
 

2023年4月26日

第九天打卡
摘要: #include<iostream> #define N 10 using namespace std; int main(){ int i,a[N]={1,2,3,4,5,6,7,8,9,10},low=0,high=N-1,mid,x=-1,m; for(i=0;i<N;i++) printf( 阅读全文
posted @ 2023-04-26 20:01 三月九 阅读(15) 评论(0) 推荐(0)
 
 

2023年4月25日

第八天打卡
摘要: #include<iostream> #define N 10 using namespace std; int main(){ int a[N],x,i,aa; for(i=0;i<N;i++) scanf("%d",&a[i]); for(i=1;i<=N-1;i++) for(x=0;x<N- 阅读全文
posted @ 2023-04-25 22:54 三月九 阅读(22) 评论(0) 推荐(0)
 
 

2023年4月24日

第七天打卡
摘要: #include<iostream> using namespace std; int main(){ float a,b,c,d,x; a=1000/(1+12*0.0063); b=(a+1000)/(1+12*0.0063); c=(b+1000)/(1+12*0.0063); d=(c+10 阅读全文
posted @ 2023-04-24 21:22 三月九 阅读(13) 评论(0) 推荐(0)
 
 

2023年4月21日

第六天打卡
摘要: #include<iostream> #include<cmath> using namespace std; float sb(float a,float b,float c,float d,float x) { return a*x*x*x+b*x*x+c*x+d; } float nt(flo 阅读全文
posted @ 2023-04-21 20:12 三月九 阅读(14) 评论(0) 推荐(0)
 
 
上一页 1 ··· 19 20 21 22 23 24 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3