#include <iostream>
#include <cmath> using namespace std; void trans1(float,float,float&,float&); void main() { float r,theta,x,y; cin>>r>>theta; trans1(r,theta,x,y); cout<<x<<" "<<y<<endl; } void trans1(float r,float theta,float&x,float&y) { x=r*cos(theta); y=r*sin(theta); } |
|