[编程入门]求和训练-题解(C++代码) 摘要:解题思路:注意事项:我是萌新参考代码:#include <iostream>#include <cstdio>using namespace std;int main(){ double a,…… 题解列表 2020年11月26日 0 点赞 0 评论 399 浏览 评分:8.0
日期换算-题解(C语言代码) 不用判断是否为闰年 直接算天数。 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a[12]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int …… 题解列表 2020年11月27日 0 点赞 0 评论 536 浏览 评分:8.0
[编程入门]宏定义练习之三角形面积-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(S,a,b,c) …… 题解列表 2020年11月27日 0 点赞 1 评论 1109 浏览 评分:8.0
[编程入门]自定义函数之字符提取-题解(C语言代码) 喜欢用for循环的过来看看! 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[1000],b[1000]; int n,i,j=0; g…… 题解列表 2020年11月29日 0 点赞 0 评论 958 浏览 评分:8.0
[STL训练]美国大选-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[100]; int n,i,j,temp,sum; while(1){ scanf("%d",&n…… 题解列表 2020年11月29日 0 点赞 1 评论 1425 浏览 评分:8.0
[编程入门]自定义函数求一元二次方程-题解(Java代码) 摘要:解题思路:了解公式,进行求解注意事项:注意精度,注意小数点后多少位,注意正负号,根号的表示参考代码://x=-b(-/+)Math.sqrt(b*b-4*a*c)/(2*a)//Math.sqrt()…… 题解列表 2020年12月01日 0 点赞 0 评论 1165 浏览 评分:8.0
输出M到N的数-题解(C语言代码) 摘要:解题思路:注意事项:注意M=N这种情况;参考代码:#include <stdio.h>int main(){ int M,N,i; scanf("%d%d",&M,&N); if(M<N) for(i…… 题解列表 2020年12月01日 0 点赞 0 评论 574 浏览 评分:8.0
二级C语言-进制转换-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i=0,j; int a[100]; scanf("%d",&n); while(n>0){ a[…… 题解列表 2020年12月02日 0 点赞 0 评论 819 浏览 评分:8.0
优质题解 [编程入门]自定义函数处理素数-题解(C语言代码) 摘要: 解题思路以及注意事项 1.首先了解下素数; 素数是指在大于1的自然数中,除了1和它本身以外不再有其他因数的自然数。 (也就是只有1跟它本身能整除掉这个数) 2.我们可以利用…… 题解列表 2020年12月05日 0 点赞 21 评论 10372 浏览 评分:8.0
用筛法求之N内的素数。 -题解 ( 两法 ) (C语言代码) 摘要:解题思路:注意事项:参考代码://法一:核心 立flag; #include<stdio.h>int main(){ int n,k,i; int flag; scanf("%d",&n); for(…… 题解列表 2020年12月05日 0 点赞 0 评论 844 浏览 评分:8.0