C语言训练-最大数问题 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,max; scanf("%d",&n); if(n!=-1) { max=n; while(n!…… 题解列表 2019年05月02日 0 点赞 0 评论 723 浏览 评分:0.0
校门外的树 (C语言代码) 摘要:参考代码:#include<stdio.h>int main(void){ int a[100][2],count=0, l, j,m; //a[100][2]用来存储m个区域的起始位…… 题解列表 2019年05月02日 1 点赞 0 评论 1610 浏览 评分:0.0
数列排序 (C语言代码) 摘要:解题思路: 思路1:将比K1大的数字用一个变量保存,然后再这个数之前的数全部往后移动一位,最后把变量中的数放到数组最前面。(无需管比K1大的数字) 思路2:重新定义两个数组,…… 题解列表 2019年05月02日 0 点赞 0 评论 1211 浏览 评分:0.0
排列 (C语言代码) 摘要:解题思路: 主要是利用排列组合的思想,用多重循环来实现。注意事项: 需要对题目要求的输出有个清楚的认识,否则会出现格式错误。 对每组卡片按从小到大的…… 题解列表 2019年05月02日 0 点赞 1 评论 1730 浏览 评分:9.9
汽水瓶 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int s = 0;int f(int n){ int x, y; if(n <= 1) return s; …… 题解列表 2019年05月02日 0 点赞 0 评论 458 浏览 评分:0.0
简单的排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[100]; int i,m,k,t; while(scanf("%d",&m…… 题解列表 2019年05月02日 0 点赞 0 评论 799 浏览 评分:0.0
三角形 (C++代码) 摘要:解题思路:动态规划,贪心不能得到最大解注意事项:三维数组提高解题效率参考代码:#include<bits/stdc++.h> #define N 50 using namespace std; …… 题解列表 2019年05月01日 1 点赞 0 评论 842 浏览 评分:0.0
高级方法求素数!!!!!!C语言训练-素数问题 (C语言代码) 摘要:解题思路:从2开始到n测试每一个数看是否为素数;一个数的因数不会大于他的一半;注意事项:内层循环要用j<=i+1,才会正确判断2是否为素数参考代码:#include<stdio.h>int main(…… 题解列表 2019年05月01日 1 点赞 0 评论 1364 浏览 评分:0.0
[编程入门]实数的打印 (C语言代码)无语的正确率。。。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float x; int i,j; scanf("%f",&x); for(i=1;i<=3;i++) { f…… 题解列表 2019年05月01日 0 点赞 0 评论 785 浏览 评分:0.0
[编程入门]宏定义之闰年判断 (C语言代码)。。。。。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define run if(y%4==0&&y%100!=0||y%400==0) printf("L"); else printf(…… 题解列表 2019年05月01日 0 点赞 0 评论 705 浏览 评分:0.0