#include<bits/stdc++.h> using namespace std; int main() { int x=-100; x=abs(x); cout<<x; } 输出:100 **功能:**返回x的绝对值。