05 2023 档案
摘要:3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; main() { int i,j,s,n; printf("请输入所选范围上限:"); scanf("%d", &n); for(i=2;i<=1000;i++) { s=0; f
阅读全文
摘要:2.思路设计 3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; main() { int x, y, z, count=1; printf("可能的兑换方法如下:\n"); for(x=0;x<=50;x+=10) for(y=0
阅读全文
摘要:3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; main() { int x, y, z, num=0; printf(" Men Women Children\n"); for(x=0;x<=10;x++) { y=20-2*
阅读全文
摘要:3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; main() { double sum = 0; int i; for(i=1;i<=64;i++) sum = sum + pow(2,i-1); printf("国王总共需要赏
阅读全文
摘要:3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; int a[14]; main() { int i, j=1, n; printf("ħÊõʦÊÖÖеÄÅÆÔʼ³ÌÐòÊÇ£º\n"); for(i=1;i<=13;i
阅读全文
摘要:三、程序流程图 四、代码实现 #include<bits/stdc++.h> using namespace std; main() { long n, sum, i; while(scanf("%ld", &n)!=EOF) { printf("ÔÚ1-%ldÖ®¼äµÄ½×ÌÝÊýΪ£º\n"
阅读全文
摘要:3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; int main() { int t, a[5]; long int k, i; for(i=95860;;i++) { for(t=0,k=100000;k>=10;t++) {
阅读全文
摘要:一、实验内容 定义一个Dog类,包括体重和年龄两个数据成员及其成员函数,声明一个实例dog1,体重5,年龄10,使用I/O流把dog1的状态写入磁盘文件。再声明一个实例dog2,通过读取文件dog1的状态赋给dog2。分别用文本方式和二进制方式操作文件。 二、实验代码 #include<bits/s
阅读全文
摘要:2.设计思路 ①依次列举出所有0~9的两位相同数字 ②在第一步的前提下依次列举出0~9的两位相同数字 ③将第一第二步中的四个数字组成的数进行开根,判断结果是否为整数后输出结果 3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; in
阅读全文
摘要:2.设计思路 3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; int main() { int i, j, x, flag=0; for(i=23;flag==0;i+=2) { for(j=1,x=i;j<=4&&x>=11;
阅读全文
摘要:2.设计思路 3.程序流程图 4.代码实现 #include<bits/stdc++.h> using namespace std; int main() { int m, n, number = 0; for(m = 0; m <= 3; m ++) { for(n = 0; n <= 3; n
阅读全文
摘要:二、设计思路 三、程序流程图 四、代码实现 #include<bits/stdc++.h> using namespace std; void print(int s[]); int judge(int c[]); int j = 0; int main() { int sweet[10] = {1
阅读全文
摘要:二、思路设计 三、程序流程图 四、代码实现 #include<bits/stdc++.h> using namespace std; int main(){ int x1, x2, x3, x5, x8, y1, y2, y3, y5, y8; double max = 0.0, result; f
阅读全文
摘要:二、思路设计 三、代码实现 #include<bits/stdc++.h> using namespace std; #define TAXBASE 3500; typedef struct { long start; long end; double taxrate; }TAXTABLE; TAX
阅读全文
摘要:三、程序流程图 四、代码实现 #include<bits/stdc++.h> #define N 10 using namespace std; main() { int i,a[N]={-3,4,7,9,13,45,67,89,100,180}, low=0,high=N-1,mid,k=-1,m
阅读全文
摘要:三、程序流程图 四、代码实现 #include<bits/stdc++.h> #define N 10 using namespace std; main() { int i, j, a[N], t, count=0; printf("ÇëΪÊý×éÔªËظ³³õÖµ£º \n"); for(i
阅读全文
摘要:二、设计思路 三、代码实现 #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
阅读全文
摘要: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+
阅读全文
摘要: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=
阅读全文