top of page

TRABAJO DEL DÍA JUEVES

#include <iostream>
#include <math.h>
using namespace std;

int main()
cout<<"CABRERA BERNAOLA FELIX GUILLERMO III-EE-2 ";
{cout<<"TRABAJO DEL DIA JUEVES \n";
 cout<<"********************** \n";
 cout<<endl<<endl;

     cout<<" CONVERTIR DE POLAR A RECTANGULAR \n";
     cout<<"********************************* \n";
   //declaracion
     int R;
     double PHI,RAD,X,Y,PI=3.141592;
   //asignacion
     cout<<"Ingrese el radio: ", cin>>R;
     cout<<"Ingrese el angulo: ", cin>>PHI;
   //proceso
     RAD=(2*PI*PHI)/360;
     X=R*cos(RAD);
     Y=R*sin(RAD);
   //resultado
     cout<<" Z= "<<X<<" +J "<<Y<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     

     cout<<" SUMA DE DOS POLARES \n";
     cout<<"******************** \n";
   //declaracion
     double xi,xii,yi,yii,ri,rii,ang1,ang2,rraadd1,rraadd2;
   //asignacion
     cout<<"Ingrese el angulo 1: ", cin>>ang1;
     cout<<"Ingrese el angulo 2: ", cin>>ang2;
     cout<<"Ingrese el radio 1: ", cin>>ri;
     cout<<"Ingrese el radio 2: ", cin>>rii;
   //proceso
    rraadd1=(2*PI*ang1)/360;
    rraadd2=(2*PI*ang2)/360;
    xi=ri*cos(rraadd1);
    xii=rii*cos(rraadd2);
    yi=ri*sin(rraadd1);
    yii=rii*sin(rraadd2);
   //suma
   //resultado
     cout<<" Z= "<< xi+xii<<" + J  "<<yi+yii<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     

     cout<<" MULTIPLICACION DE DOS RECTANGULARES \n";
     cout<<"************************************ \n";
   //declaracion
     int X1,X2,Y1,Y2;
     double PHI3,R3,R1,PHI1,R2,PHI2;
   //asignacion
     cout<<"Ingrese el X1: ", cin>>X1;
     cout<<"Ingrese el X2: ", cin>>X2;
     cout<<"Ingrese el Y1: ", cin>>Y1;
     cout<<"Ingrese el Y2: ", cin>>Y2;
   //proceso
   R1=sqrt(pow(X1,2)+pow(Y1,2));
   PHI1=atan(Y1/X1);
   R2=sqrt(pow(X2,2)+pow(Y2,2));
   PHI2=atan(Y2/X2);
   //division
   R3=(R1*R2);
   PHI3=PHI1+PHI2;
   //resultado
     cout<<" EL RADIO = "<< R3<< " Y EL ANGULO: "<< PHI3<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     
     cout<<" RESTA DE POLARES \n";
     cout<<"***************** \n";
    //resta
    //resultado
     cout<<" Z= "<< xi-xii<<" + J  "<<yi-yii<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");

       cout<<" DIVICION DE RECTANGULARES \n";
       cout<<"************************** \n";
    //division
   R3=(R1/R2);
   PHI3=PHI1-PHI2;
   //resultado
     cout<<" EL RADIO = "<< R3<< " Y EL ANGULO: "<< PHI3<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     return 0;
     
}//FIN

COMPILACIÓN

Sin título.png

TRABAJO 3 

Sin_título25.png
bottom of page