2779:输出绝对值(椎名真昼天下第一可爱) 解题思路:直接用数学公式好吧,abs对应整数绝对值求解,fabs对应double类型求绝对值,fabsf对应float类型注意事项:椎名真昼天下第一可爱,注意保留两位小数参考代码:#include#includeintmain(){floata, 题解列表 2026年10月27日 1 点赞 1 评论 36 浏览 评分:10.0
2025.7.22刷题记录 摘要:解题思路:fabs对浮点数求绝对值注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ dou…… 题解列表 2025年07月22日 2 点赞 0 评论 761 浏览 评分:10.0
简易,易懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ float a; scanf ("%f",&a); if (a>=0) { …… 题解列表 2024年12月03日 3 点赞 0 评论 1112 浏览 评分:10.0
编写题解 2779: 输出绝对值 摘要:解题思路:#include <bits/stdtr1c++.h>using namespace std;int main(){ double a; cin>>a; if(a>0) …… 题解列表 2023年12月10日 0 点赞 0 评论 1074 浏览 评分:9.9
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ double a; scanf("%lf",&a); prin…… 题解列表 2023年03月24日 0 点赞 0 评论 847 浏览 评分:9.9
C语言解决输出绝对值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){double x;scanf("%lf",&x);if(x<0)printf("%.2f\n",-x);if(x>…… 题解列表 2022年11月02日 1 点赞 3 评论 1691 浏览 评分:9.0
输出绝对值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ double x; scanf("%lf",&x); p…… 题解列表 2022年12月30日 0 点赞 0 评论 896 浏览 评分:8.0
求绝对值的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ float a; scanf("%f",&a); if(a>=0){ printf("%.2f",a); }…… 题解列表 2022年10月25日 0 点赞 0 评论 856 浏览 评分:7.0
感谢支持,谢谢你们的支持 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int main(){ double a; cin>>a; if(a<0) {…… 题解列表 2023年05月13日 0 点赞 0 评论 523 浏览 评分:6.0
题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;double a;int main(){ cin>>a; if(a>0…… 题解列表 2023年12月10日 0 点赞 0 评论 884 浏览 评分:6.0