POINT+SOL

code using namespace std;
 * 1) include
 * 2) include 

class PT{ protected: int x,y,z; public: PT{x=0; y=0; z=0;};//Default Constructor PT(int A, int B, int C){x=A;y=B;z=C;};//Constructor 2 ~PT{}; //Destructor

void PRINT{cout << "(" << x << "," << y << "," << z << ")";};

void NEGATE{ x=x*-1; y=y*-1; z=z*-1; };//Negate

double NORM{ return sqrt(double(x*x+y*y+z*z)); };//Norm

};//Point class

int main{ PT P1(1,2,3),P2(4,5,6); P1.PRINT; P1.NEGATE; P1.PRINT; double Dist = P1.NORM; cout << endl << Dist << endl; P1.PRINT; system("pause");

}; code