C语言程序设计教程(第三版)课后习题8.3 (C语言代码) 摘要:解题思路:注意事项:参考代码:\void fun(int m){ int i; if(m>=2) { for(i=2;i<m;i++) { …… 题解列表 2019年01月19日 0 点赞 0 评论 605 浏览 评分:0.0
The 3n + 1 problem (C++代码) 摘要:解题思路:将每一个区间内的数进行运算,找出其中循环次数最多的那一个注意事项:/*1 41 4 84 14 1 85 15 1 86 16 1 9 7 17 1 17*/先后输入的俩个数需要比大小让小的…… 题解列表 2019年01月19日 0 点赞 0 评论 450 浏览 评分:0.0
【亲和数】 (C语言代码) 摘要:参考代码:#include<stdio.h> int main() { int a, b, i, n,e, sum1=0,sum2=0; //sum1是保存数b的因数和,sum2是保存数a的…… 题解列表 2019年01月19日 0 点赞 0 评论 498 浏览 评分:0.0
字符串的输入输出处理 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>#include<cstdio>using namespace std;int main(){ …… 题解列表 2019年01月19日 0 点赞 0 评论 603 浏览 评分:0.0
字符逆序 (C++代码) 摘要:解题思路:把数组逆序输出注意事项:有空格,用gets()输入cin不识别控制符参考代码:#include<iostream>#include<string.h>#include<cstdio>usin…… 题解列表 2019年01月19日 0 点赞 0 评论 657 浏览 评分:0.0
用筛法求之N内的素数。 (C++代码) 摘要:解题思路:利用标志来寻找其是否有其他因子注意事项:1不是素数参考代码:#include<iostream>using namespace std;int main(){ int m,n,i,j;…… 题解列表 2019年01月19日 0 点赞 0 评论 560 浏览 评分:0.0
Hello, world! (C++代码) 摘要:解题思路:利用强制类型转换注意事项:c++有默认的文件结束参考代码:#include<iostream>using namespace std;int main(){ int a; w…… 题解列表 2019年01月19日 0 点赞 0 评论 621 浏览 评分:0.0
蓝桥杯2017年第八届真题-包子凑数 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstring>#include <cstdio>#define MAXN 10010 //最多凑出的包子个…… 题解列表 2019年01月19日 4 点赞 0 评论 1026 浏览 评分:8.0
优质题解 C/C++两种解法 求 寻找奇整数 (C/C++语言代码) 摘要:解题思路:第一步: 将3,7,5,13,25,45,78,23,8,33,9,19,28,41,50存入数组a中。第二步: 数组的长度: 数组的总字节数/数组数据类型字节,即sizeof(a)/siz…… 题解列表 2019年01月19日 2 点赞 0 评论 1661 浏览 评分:4.7
C++ Algorithm算法 之 查找最小的k个元素 (C/C++语言代码) 摘要:解题思路:本题思路非常简单。第一步: 把n个数导入到vector容器中。第二步: 对输入的n个数进行排序。排序:sort(vec.begin(),vec.end());sort(vec.rbegin(…… 题解列表 2019年01月18日 1 点赞 0 评论 963 浏览 评分:9.9