#include<stdio.h>

struct Vetor{
    float x;
    float y;
    float z;
};

void soma(struct Vetor* v1, struct Vetor* v2, struct Vetor* res) {
    (*res).x = (*v1).x + (*v2).x;
    (*res).y = (*v1).y + (*v2).y;
    (*res).z = (*v1).z + (*v2).z;
}

int main(void)
{
    struct Vetor v1, v2, v3;

    printf("Digite as coordenadas de v1: ");
    scanf("%f %f %f", &v1.x, &v1.y, &v1.z);

    printf("\nDigite as coordenadas de v2: ");
    scanf("%f %f %f", &v2.x, &v2.y, &v2.z);

    soma(&v1, &v2, &v3);

    printf("\nv1 + v2 = \(%.2f, %.2f, %.2f\)\n", v3.x, v3.y, v3.z);

    system("pause");
    return 0;
}