C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m; double t=1,i,b=0; scanf("%d",&m); for(i=2;i<=m;i+…… 题解列表 2022年11月09日 0 点赞 0 评论 410 浏览 评分:8.0
2的n次方(大数版) 摘要:解题思路:注意事项:涉及高精度计算(用数组)参考代码:#include <stdio.h>int a[100000];int main(){ int k=1,n=0,i,j; scan…… 题解列表 2022年11月09日 1 点赞 2 评论 780 浏览 评分:8.0
计算三角形面积 摘要:解题思路:海伦公式S=1/4√(a+b+c)(a+b-c)(a+c-b)(b+c-a)注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ …… 题解列表 2022年11月11日 0 点赞 0 评论 729 浏览 评分:8.0
1058: 二级C语言-求偶数和(菜鸟)感觉有问题,测试过了,但是DEV C++不能完全通过,求大佬指导 摘要:解题思路:两个for循环;一个用于输入数字,另一个用于讲数组中的数字挨个判断是否为偶数注意事项:参考代码:#includeint main(void){ int i,n,m=0; int …… 题解列表 2022年11月11日 0 点赞 0 评论 341 浏览 评分:8.0
1015: [编程入门]求和训练 摘要:解题思路:注意事项:注意倒数需用double,以输出浮点数参考代码:#include<stdio.h>int main(){ int a,b,c; int A=0,B=0; doub…… 题解列表 2022年11月13日 0 点赞 0 评论 288 浏览 评分:8.0
编题的重大bug!!!!!!!!!!!!!!进来看 摘要:解题思路:样例10 1 把自己输出的结果改为99.20就行了。注意事项:参考代码:Scanner c = new Scanner(System.in);double n = c.nextDouble(…… 题解列表 2022年11月13日 0 点赞 1 评论 548 浏览 评分:8.0
输出格式要是%f型不能是整型,%20就是float型 摘要:解题思路:输出格式要是%f型不能是整型,%20就是float型注意事项:输出单位参考代码:#include <stdio.h>int main(){int b,c,d;//a=b作业20,c小测30,…… 题解列表 2022年11月17日 0 点赞 0 评论 458 浏览 评分:8.0
编写题解 2828: 与7无关的数(c语言 摘要:解题思路:一个正整数,如果它能被7整除,或者它的十进制表示法中某一位上的数字为7,则称其为与7相关的数。现求所有小于等于n(n < 100)的与7无关的正整数的平方和。注意事项:①不能被7整除 …… 题解列表 2022年11月17日 0 点赞 2 评论 1107 浏览 评分:8.0
面向结果输出(要脸,别举报) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { printf("cock=0,hen=25,chicken=75\ncock=4,hen=18,chicke…… 题解列表 2022年11月22日 0 点赞 1 评论 748 浏览 评分:8.0
编写题解 2837: 年龄与疾病 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int jibing(int A[100],float n){ int i; float w,x,y,z; for(i=0;i<n;…… 题解列表 2022年11月23日 0 点赞 0 评论 413 浏览 评分:8.0