新手解题法——————课后习题5.8 (C语言代码) 摘要:解题思路:注意事项:注意计算正确参考代码:#include <stdio.h>int main(){ int n,i,a,b,c,d,e; scanf("%d",&n); b=n-1…… 题解列表 2019年01月18日 0 点赞 0 评论 773 浏览 评分:0.0
Hello, world! (C++代码) 摘要:解题思路:利用强制类型转换注意事项:c++有默认的文件结束参考代码:#include<iostream>using namespace std;int main(){ int a; w…… 题解列表 2019年01月19日 0 点赞 0 评论 619 浏览 评分: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
字符逆序 (C++代码) 摘要:解题思路:把数组逆序输出注意事项:有空格,用gets()输入cin不识别控制符参考代码:#include<iostream>#include<string.h>#include<cstdio>usin…… 题解列表 2019年01月19日 0 点赞 0 评论 657 浏览 评分:0.0
字符串的输入输出处理 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>#include<cstdio>using namespace std;int main(){ …… 题解列表 2019年01月19日 0 点赞 0 评论 603 浏览 评分: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 评论 495 浏览 评分: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语言程序设计教程(第三版)课后习题8.3 (C语言代码) 摘要:解题思路:注意事项:参考代码:\void fun(int m){ int i; if(m>=2) { for(i=2;i<m;i++) { …… 题解列表 2019年01月19日 0 点赞 0 评论 603 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.4 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include "stdafx.h"int main(){ int a[3][3],b[3][3],i,j; for(i=0;i<3;i++) …… 题解列表 2019年01月19日 0 点赞 0 评论 843 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.5 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include "stdafx.h"#include<string.h> void fun(char a[],char b[]) { …… 题解列表 2019年01月19日 0 点赞 0 评论 596 浏览 评分:0.0