用筛法求之N内的素数。 (C语言代码) 摘要:#include<stdio.h>int main(){ int a,j,i,n,h=2; scanf("%d",&n);//输入N if(n>1) { printf("2\n"); for(…… 题解列表 2017年09月17日 0 点赞 0 评论 1852 浏览 评分:9.5
计算质因子 (C++代码) 摘要:参考代码:#include <iostream>#include <stdio.h>using namespace std;bool mark[1000];int prime[1000];int pr…… 题解列表 2017年09月16日 1 点赞 0 评论 2422 浏览 评分:6.3
打水问题 (C语言代码) 摘要:解题思路:贪心策略注意事项:参考代码:#include <stdio.h>int main(){ int a[100],b[10][100]={{0,0}}; int n,m,sum=0,t,i,j…… 题解列表 2017年09月16日 0 点赞 1 评论 1494 浏览 评分:6.0
C语言程序设计教程(第三版)课后习题1.5 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <cstdio>using name space;main(){ cout<<""}…… 题解列表 2017年09月15日 0 点赞 0 评论 840 浏览 评分:0.0
【出圈】 (C语言代码) 摘要:解题思路:利用指针取找最后留下来的数值,参见语句注释注意事项:参考代码:#include<stdio.h>int main(){ int i,n,m,*p,a[1000],k,l; //定义整…… 题解列表 2017年09月15日 4 点赞 0 评论 1045 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.3 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int isPrime(int num) { int i,flag=0; for(i=2;i<num;i++){ …… 题解列表 2017年09月14日 1 点赞 0 评论 1043 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题8.3 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int maxCommonDivisor(int a, int b) { int max = a > b ? a : b…… 题解列表 2017年09月14日 0 点赞 0 评论 1010 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题6.10 (C语言代码) 摘要:解题思路:我这个是倒着推的,从最后一天剩下1个开始往前推. 如果是最后一天,sum应该加1,因为只剩下一个但是如果不是最后一天,应该是前一天剩下的数量*2 +2才对, 只所以不是加1是因为 直接拿昨天…… 题解列表 2017年09月14日 0 点赞 0 评论 1122 浏览 评分:0.0
淘淘的名单 (C语言代码)答案错误??? 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int i,n; char str…… 题解列表 2017年09月14日 0 点赞 1 评论 841 浏览 评分:2.0
C语言程序设计教程(第三版)课后习题6.9 (C语言代码) 摘要:解题思路:注意事项:我也不想多说什么,可能是我理解有问题,最后一次弹起的距离竟然不算.参考代码:#include <stdio.h> int main() { int times,i; …… 题解列表 2017年09月13日 0 点赞 0 评论 865 浏览 评分:0.0