#include <iostream>

using namespace std;

struct Point {
    int x;
    int y;
};

int main() {

    Point points[3];
    Point* p;

    int xx = 0,yy = 0;

    for (int i = 0;i < 3;i++) {
        cin >> points[i].x >> points[i].y;
    }

    for (int i = 0;i < 3; i++) {
        p = &points[i];
        xx += p->x;
        yy += p->y;
    }

    cout << "X:" <<xx <<endl;
    cout << "Y:"<<yy <<endl;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: