# include iostream include math using namespace std class PointSphere pr

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97``` ```#include #include using namespace std; class PointSphere{ private: double lat1, lon1, rad, lat2, lon2, x, y, z; public: void SetDesc(){ double dx, dy, dz; cout<<"Input x, y и z"<>dx>>dy>>dz; x = dx; y = dy; z = dz; } void SetPolar(){ double plat, plon, prad; cout<<"Input latitude, longitude and radius"<>plat>>plon>>prad; lat1 = plat; lon1 = plon; rad = prad; } void SetPolarForLenth(){ double plat1, plon1, plat2, plon2, prad; cout<<"Input first latitude, longitude and overall radius"<>plat1>>plon1>>prad; lat1 = plat1; lon1 = plon1; rad = prad; cout<<"Input second latitude and longitude"<>plat2>>plon2; lat2 = plat2; lon2 = plon2; } void ConvertToPolar(){ lat1 = atan(pow((pow(x,2) + pow(y,2)),0.5)/z); lon1 = atan(x/y); rad = sqrt(pow(x,2) + pow(y,2) + pow(z,2)); cout<>change; if(change == 1){ PointSphere descart; descart.SetDesc(); descart.ConvertToPolar(); } if(change == 2){ PointSphere polar; polar.SetPolar(); polar.ConvertToDescartes(); } if(change == 3){ PointSphere point; point.SetPolarForLenth(); point.CountOfLenght(); } } return 0; } ```