04 2023 档案

摘要:#include<bits/stdc++.h> using namespace std; class Time { private: int minute; int hour; public: void set(int h, int m) { minute = m; hour = h; } frie 阅读全文
posted @ 2023-04-27 21:11 yblll 阅读(12) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; class number { int fz, fm; friend number operator+(number &n1,number &n2); public: number(int a=0,int b=1 阅读全文
posted @ 2023-04-26 23:13 yblll 阅读(13) 评论(0) 推荐(0) 编辑
摘要:2.设计思路 3.程序流程图 4.代码实现 #include<bits/stdc++.h> int main() { float solution(float a, float b, float c, float d); float a, b, c, d, x; printf("ÇëÊäÈë·½³Ì 阅读全文
posted @ 2023-04-25 17:30 yblll 阅读(17) 评论(0) 推荐(0) 编辑
摘要:二、设计思路、 1.先输出前两个月的兔子数,然后进入循环 2.循环中每过一个月都会有新兔子产生,迭代求出当前月份的兔子数 3.求和输出每个月的兔子总数 三、程序流程图 四、代码实现 #include<stdio.h> using namespace std; int main() { long ra 阅读全文
posted @ 2023-04-24 21:43 yblll 阅读(15) 评论(0) 推荐(0) 编辑
摘要:class Person { public: virtual void bellRing() {} virtual ~Person(){} }; class Student:public Person { public: void bellRing(){ cout << "I am a studen 阅读全文
posted @ 2023-04-23 18:07 yblll 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include <string> using namespace std; class Vehicle { protected: string NO;//编号 public: Vehicle(string n){ NO = n; } virtual int f 阅读全文
posted @ 2023-04-23 18:05 yblll 阅读(3) 评论(0) 推荐(0) 编辑
摘要:2.设计思路 ①依次列举出所有0~9的两位相同数字 ②在第一步的前提下依次列举出0~9的两位相同数字 ③将第一第二步中的四个数字组成的数进行开根,判断结果是否为整数后输出结果 3.程序流程图 4、代码实现 #include<bits/stdc++.h> using namespace std; in 阅读全文
posted @ 2023-04-21 19:30 yblll 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; int main() { int i; double b = 0.0, a = 1000; for(i <= 0; i < 5; i ++){ b = (b + a) / (1 + 12 * 0.063); } 阅读全文
posted @ 2023-04-21 19:15 yblll 阅读(13) 评论(0) 推荐(0) 编辑
摘要:二、设计思路 1.首先判断指定日期年份是否为闰年 2.然后计算出指定日期到1990年1月1日有多少天 3.三天打鱼两天晒网,一个周期为5天,将算出的天数除以5。 4.根据上一步计算结果的余数判断是打鱼还是晒网 (余数为1,2,3为打鱼,余数为4,5则为晒网) 三、程序流程图 四、代码实现 #incl 阅读全文
posted @ 2023-04-19 15:57 yblll 阅读(12) 评论(0) 推荐(0) 编辑
摘要:2.设计思路 ①.定义A,B,C ②套入循环,先让A选择一本书 ③在A选完书的前提下让B选择一本书 ④在A和B选完书的前提下让C选择一本书 ⑤将A,B,C分别选择的值输出,代表分别选择的书; #include<bits/stdc++.h> using namespace std; int main( 阅读全文
posted @ 2023-04-18 17:47 yblll 阅读(9) 评论(0) 推荐(0) 编辑
摘要:二.设计思路 1.初始化cock,hen,chicken; 2.套入循环 ①最外层循环控制cock值小于等于20; ②内层循环控制hen值小于等于33,cock增加; ③内层循环控制chicken小于等于100,hen增加; ④代入cock,hen和chicken的值进行运算,如果价格总和等于100 阅读全文
posted @ 2023-04-17 18:12 yblll 阅读(15) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示