int做除法默认floor,如果想还原结果百分比需要*1.0 摘要:解题思路:1.int做除法默认floor,如果想还原结果百分比需要*1.0。如p=1.0*b/a;2.多行数据,如果要用前面一行求固定值,直接输入即可。不用想复杂,又引入数组索引,太麻烦。 cin>>…… 题解列表 2024年12月03日 1 点赞 0 评论 309 浏览 评分:10.0
简易,易懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ float a; scanf ("%f",&a); if (a>=0) { …… 题解列表 2024年12月03日 2 点赞 0 评论 836 浏览 评分:10.0
[编程入门]自由下落的距离计算,简单易懂(Java) 摘要:解题思路:小球该次弹起的高度+弹起前下落的高度=该次弹起高度的3倍。注意事项:无参考代码:import java.util.Scanner;public class Main { public …… 题解列表 2024年12月03日 1 点赞 0 评论 469 浏览 评分:10.0
题目意思要理解清楚 摘要:解题思路:注意事项:只动最小值,最大值,第一位,最后一位这四个位置的数字,其他的不动哦。(先找最小值,再找最大值)参考代码:#include<stdio.h>void f1(int a[]){ …… 题解列表 2024年12月04日 3 点赞 0 评论 922 浏览 评分:10.0
简易,易懂 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int main(){ int a,b,c; for (int i=100; i<1…… 题解列表 2024年12月04日 11 点赞 0 评论 1874 浏览 评分:10.0
最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int m, n; scanf("%d %d", &m, &n); …… 题解列表 2024年12月04日 10 点赞 0 评论 2122 浏览 评分:10.0
使用方法嵌套来解决此问题 摘要:解题思路:注意事项:参考代码:public static void main(String []args){ int num1,num2,num3; int max; Scanner…… 题解列表 2024年12月04日 1 点赞 0 评论 1443 浏览 评分:10.0
[编程入门]自由下落的距离计算--巨无敌容易看懂(C语言) 摘要:解题思路:将下落过程加上后,将每落地一次变成落地前的一半并加到路程中,并注意最后一次反弹时不加入到路程中注意事项:要注意变量的定义参考代码:#include<stdio.h>int main(){ …… 题解列表 2024年12月04日 9 点赞 0 评论 1210 浏览 评分:10.0
年龄与疾病 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,a[n],b=0,c=0,d=0,e=0; float f,g,h,j; sc…… 题解列表 2024年12月05日 1 点赞 1 评论 652 浏览 评分:10.0
【编程入门】自定义函数处理最大公约数与最小公倍数 摘要:解题思路: 求最大公约数利用辗转相除法(欧几里得算法),求最小公倍数利用公式 lcm = (x * y) / gcd(x, y)注意事项: 理解辗转相除法的本质参考代码:#include <stdio…… 题解列表 2024年12月05日 5 点赞 0 评论 1604 浏览 评分:10.0