• + 45 comments

    you can not include any library, just like this

    void update(int *a,int *b) {
        int sum = *a + *b;
        int absDifference = *a - *b > 0 ? *a - *b : -(*a - *b);
        *a = sum;
        *b = absDifference; 
    }