• + 0 comments

    //hope this will help you

    include

    include

    include

    include

    include

    using namespace std;

    void update(int *a, int *b){ *a = *a + *b; cout << *a << endl; *a = *a - *b; *b = abs(*a - *b); cout << *b << endl; }

    int main() { int a, b; int *x = &a; int *y = &b; scanf ("%d\n %d", &a, &b); (update(x, y)); return 0; }