1 2 3 4 5 6 7 8 9 10 11
#include <iostream> using namespace std; int mod(int n) { return n < 0 ? -n : n; } int main() { cout << mod(-4) << endl; }