题解 2779: 输出绝对值

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){    double m;    int ret;    do{        ……

2779 输出绝对值题解

摘要:解题思路:本题只需要按照题干的要求模拟输出即可。注意事项:1.绝对值,即非负数的绝对值为其本身,负数的绝对值为其相反数(即符号相反)              2.注意保留两位小数。可以用fixed和……

2779: 输出绝对值

摘要:解题思路: 这道题考察的是条件语句的应用注意事项:参考代码:a = float(input())if a >= 0:    print(&#39;{:.2f}&#39;.format(a))  #第一……

编写题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:print(&#39;%.2f&#39;%abs(float(input()))) #print(&#39;{:.2f}&#39;.format(abs(float(i……

编写题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double a;    cin>>a;    pr……

题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;double a;int main(){    cin>>a;    if(a>0……

求绝对值的方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main (){ float a; scanf("%f",&a); if(a>=0){ printf("%.2f",a); }……