155k views
0 votes
Solution is c language please help me.​

Solution is c language please help me.​-example-1
User Jim Wood
by
4.8k points

1 Answer

1 vote

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;

}

User Sethmlarson
by
4.5k points