摘要: 三、程序流程图 四、代码实现 #include<bits/stdc++.h> #define N 10 using namespace std; main() { int i, j, a[N], t, count=0; printf("ÇëΪÊý×éÔªËØ¸³³õÖµ£º \n"); for(i 阅读全文
posted @ 2023-05-09 16:03 yblll 阅读(22) 评论(2) 推荐(0)
摘要: 二、设计思路 三、代码实现 #include<bits/stdc++.h> using namespace std; int main() { int i; double money = 0.0; for(i=0;i<5;i++) money = (money+1000.0)/(1+0.0063*1 阅读全文
posted @ 2023-05-08 21:25 yblll 阅读(19) 评论(1) 推荐(0)
摘要: template <class T> void sort(T *a, int size) { for(int i=0;i<size;i++) { cin>>a[i]; } for(int i=0; i<size; i++) { int min=i; for(int j=i+1; j<size; j+ 阅读全文
posted @ 2023-05-05 09:10 yblll 阅读(31) 评论(6) 推荐(0)
摘要: template<class T> class MyArray{ private: int size; T *data; public: MyArray(int s){ size=s; data=new T[size]; } void sort(){ int i,j,min; T t; for(i= 阅读全文
posted @ 2023-05-05 09:09 yblll 阅读(17) 评论(0) 推荐(0)
摘要: #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 阅读(19) 评论(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 阅读(18) 评论(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 阅读(23) 评论(0) 推荐(0)
摘要: 二、设计思路、 1.先输出前两个月的兔子数,然后进入循环 2.循环中每过一个月都会有新兔子产生,迭代求出当前月份的兔子数 3.求和输出每个月的兔子总数 三、程序流程图 四、代码实现 #include<stdio.h> using namespace std; int main() { long ra 阅读全文
posted @ 2023-04-24 21:43 yblll 阅读(19) 评论(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 阅读(17) 评论(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 阅读(7) 评论(0) 推荐(0)