Step-by-step explanation:
in c++
#include<iostream.h>
#using namespace std;
main()
{ float x,y,z,r, phi, theta;
cout<<" enter the value of x";
cin>>x;
cout<<" enter the value of y";
cin>>y;
cout<<" enter the value of z";
cin>>z;
r = (sqrt(pow(x,2) + pow(y, 2) + pow(z, 2)));
phi = (asinf(y/r)*180.0f)/PI;
theta = (asinf(-x/(r*cosf(phi)))*180.0f)/PI;
cout<<"The radius r= "<<r;
cout<<"The phi angle= "<<phi;
cout<<"The theta angle= "<<theta;
return 0;
}