[Solved] Sum relative numbers C++ [closed]


I don’t know about such function, however you can simply create one: just add absolute values:

#include <iostream>

int sumAbs( int a, int b) {
    return std::abs( a) + std::abs( b);
}

int main() {
    int a = -5;
    int b = 10;
    std::cout << sumAbs( a, b); // 15
    return 0;
}

solved Sum relative numbers C++ [closed]