#include <iostream>
#include <cmath>
#include <iomanip>

int main() {
    double x;
    std::cin >> x;
    double absValue = std::abs(x);
    std::cout << std::fixed << std::setprecision(2) << absValue << std::endl;
    return 0;
}
练422 求绝对值求实数的绝对值。【输入】输入一个实数 x0≤∣x∣≤106。【输出】输出他的绝对值结果保留两位小数请用c++代码写出用上abs函数

原文地址: https://www.cveoy.top/t/topic/iiho 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录