题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){ double m; int ret; do{ …… 题解列表 2023年08月17日 0 点赞 0 评论 200 浏览 评分:0.0
感谢支持,谢谢你们的支持 摘要:解题思路:#include<iostream>using namespace std;int main(){ int x,y; cin>>x>>y; if(x>y) { …… 题解列表 2023年05月13日 0 点赞 0 评论 282 浏览 评分:0.0
2779 输出绝对值题解 摘要:解题思路:本题只需要按照题干的要求模拟输出即可。注意事项:1.绝对值,即非负数的绝对值为其本身,负数的绝对值为其相反数(即符号相反) 2.注意保留两位小数。可以用fixed和…… 题解列表 2022年12月31日 0 点赞 0 评论 208 浏览 评分:0.0
逻辑表达式与条件分支--2.输出绝对值 摘要:求浮点数的绝对值:#include<math.h>fabs(a)参考代码:#include<stdio.h>#include<math.h>int main(){ float a; scanf("%f…… 题解列表 2023年03月24日 0 点赞 0 评论 153 浏览 评分:0.0
2779: 输出绝对值 摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0: print('{:.2f}'.format(a)) #第一…… 题解列表 2022年11月27日 0 点赞 0 评论 462 浏览 评分:2.0
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:print('%.2f'%abs(float(input()))) #print('{:.2f}'.format(abs(float(i…… 题解列表 2022年10月18日 1 点赞 0 评论 1277 浏览 评分:5.6
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a; cin>>a; pr…… 题解列表 2023年12月09日 0 点赞 2 评论 98 浏览 评分:6.0
题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;double a;int main(){ cin>>a; if(a>0…… 题解列表 2023年12月10日 0 点赞 0 评论 461 浏览 评分:6.0
感谢支持,谢谢你们的支持 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int main(){ double a; cin>>a; if(a<0) {…… 题解列表 2023年05月13日 0 点赞 0 评论 206 浏览 评分:6.0
求绝对值的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ float a; scanf("%f",&a); if(a>=0){ printf("%.2f",a); }…… 题解列表 2022年10月25日 0 点赞 0 评论 454 浏览 评分:7.0