- AcWing 810. 绝对值
- AC代码
AcWing 810. 绝对值
本题链接:AcWing 810. 绝对值
本博客给出本题截图:
代码:
#includeusing namespace std; int abs(int x) { if (x > 0) return x; return -x; } int main() { int x; cin >> x; cout << abs(x) << endl; return 0; }

本题链接:AcWing 810. 绝对值
本博客给出本题截图:
代码:
#includeusing namespace std; int abs(int x) { if (x > 0) return x; return -x; } int main() { int x; cin >> x; cout << abs(x) << endl; return 0; }