#include <stdio.h>
#include <string.h>
// (*ptr).x == ptr->x
typedef struct point
{
int xpos;
int ypos;
}Point;

void show_pos(Point pos) {
    printf("%d %d",pos.xpos, pos.ypos);
}

Point get_current_pos(void) {
    Point cur;
    scanf("%d %d",&cur.xpos, &cur.ypos);
    return cur;
}

void change(Point *ptr){
    ptr-> xpos = (ptr->xpos)*-1;
    ptr-> ypos = (ptr->ypos)*-1;
}

int main() {
    Point cur_pos=get_current_pos();
    change(&cur_pos);
    show_pos(cur_pos);
    return 0;
}

Embed on website

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