求平均年龄 摘要:解题思路:注意事项:参考代码: double a,sum,b,num; cin>>a; if(a>=1.0 && a<=100.0){ sum=0; for (in…… 题解列表 2023年07月28日 0 点赞 0 评论 588 浏览 评分:0.0
ceil和类型转换解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,x,y; double m; scanf("%d%…… 题解列表 2023年07月28日 0 点赞 0 评论 566 浏览 评分:0.0
1200: 回文串(C语言) 摘要: #include #include int main() { char str[255]; scanf("%s",str); int length=strlen…… 题解列表 2023年07月28日 0 点赞 0 评论 554 浏览 评分:0.0
有规律的数列求和(感觉主要考查变量赋值) 解题思路:这题的话,设置了三个变量值来得出每一项,从题目可知,每一项的分母是前一项的分子,每一项的分子是前一项的分子和分母的和注意事项:分式要保留小数的话,其中一个数要为精度类型参考代码:```c#includeintmain(){intn;scanf("%d", 题解列表 2023年07月30日 0 点赞 0 评论 691 浏览 评分:0.0
【编程入门】阶乘求和 摘要:解题思路:注意求和的范围要大注意事项:参考代码:#include<stdio.h>int main(){ unsigned long int s1=1,s2=0; int n; sc…… 题解列表 2023年07月30日 0 点赞 0 评论 495 浏览 评分:0.0
计算多项式的值 摘要:解题思路:注意事项:还是要注意数据的使用类型范围!参考代码:#include<stdio.h>int main(){ double x,t=1,s=1; int n; scanf("…… 题解列表 2023年07月30日 0 点赞 0 评论 629 浏览 评分:0.0
完数的判断(嵌套循环) 摘要:解题思路: 这题不好做,至少对于我( ´・・)ノ(._.`),想到了用数组来存完数的因子,那就好多了 注意事项: 参考代码: ```c #include int main() {…… 题解列表 2023年07月30日 0 点赞 0 评论 603 浏览 评分:0.0
求三个数最大值 摘要:解题思路:假设其中一个数为最大值,分别与另外两个数做比较。参考代码:#include<stdio.h>int main(){ int a,b,c; int m = 0; scanf("%d %d…… 题解列表 2023年07月30日 0 点赞 0 评论 591 浏览 评分:0.0
无需结构体的做法(C语言) #include#includeintmain(){intnum;//投票人数(数据个数)charcolor[1000][20];//所有人投票的颜色结果记录在这里charsort[1000][20];//将投票结果按颜色分类之后记录在这里inta=0;//该变量用来计种类个数intsort_num[ 题解列表 2023年07月30日 0 点赞 0 评论 583 浏览 评分:0.0