You are on page 1of 1

#include<iostream>

using namespace std;


struct pt
{
int x,y,z;
};
void main()
{
struct pt P1,P2,P3;
cout<<"enter the coordinates of point P1 and P2";
cin>>P1.x>>P1.y>>P1.z>>P2.x>>P2.y>>P2.z;
P3.x=P1.x+P2.x;
P3.y=P1.y+P2.y;
P3.z=P1.z+P2.z;
cout<<"the coordinates of point P3 is"<<P3.x<<P3.y<<P3.z;

You might also like