2025.7.22刷题记录 摘要:解题思路:fabs对浮点数求绝对值注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ dou…… 题解列表 2025年07月22日 0 点赞 0 评论 72 浏览 评分:0.0
C++简单解法 摘要:解题思路:属于基础题目,重要的是知道求绝对值的函数fabs及如何控制小数点后的位数注意事项:参考代码:#include<iostream>#include<cmath>#inc…… 题解列表 2025年03月04日 0 点赞 0 评论 250 浏览 评分:0.0
普普通通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main (){ float r; scanf("%f",&r); if (fabs(r) <=…… 题解列表 2024年11月16日 0 点赞 0 评论 249 浏览 评分:0.0
c语言中双精度绝对值的函数 摘要:解题思路:计算浮点型绝对值使用fabs函数,原型:double fabs(double x)计算整数绝对值使用abs函数,原型:int abs(int x)计算长整型绝对值使用labs函数,原型:lo…… 题解列表 2024年11月07日 0 点赞 0 评论 267 浏览 评分:0.0
输入绝对值 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ float f; scanf("%f",&f); printf("%.2f",f > 0 ? (f) : (-…… 题解列表 2024年04月20日 0 点赞 0 评论 223 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路: 这个题目没有难点,就是要知道在程序里面绝对值怎么表示 1.使用内置函数来表示 abs(获取整型的绝对值)函数是C语言中的一个内置函…… 题解列表 2024年03月01日 0 点赞 0 评论 196 浏览 评分:0.0
Java-易懂详细代码 摘要:参考代码:import java.util.Scanner; public class Main { public static void main(String[] args) {…… 题解列表 2024年02月09日 0 点赞 0 评论 424 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x; cin >> x ; …… 题解列表 2023年12月17日 0 点赞 0 评论 140 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x; cin >> x ; …… 题解列表 2023年12月17日 0 点赞 0 评论 125 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x; cin >> x ; …… 题解列表 2023年12月17日 0 点赞 0 评论 166 浏览 评分:0.0