top of page

FASORES

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

int main()
{cout<<"FASORES\n";
 cout<<"**************\n";
 cout<<endl<<endl;

   //formula 1
     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");
     
     
     
     
   //formula 2
     cout<<" convertir de rectangular a polar\n";
     cout<<"*****************************************\n";
   //declaracion
     double x,y,angulo, radio;
   //asignacion
     cout<<"Ingrese el x: ", cin>>x;
     cout<<"Ingrese el y: ", cin>>y;     
   //proceso
      radio=sqrt(pow(x,2)+pow(y,2));
      angulo=atan(y/x);
   //resultado
     cout<<"EL RADIO ES: "<<radio<< "Y EL ANGULO ES: "<<angulo<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     
     
     
     
   //formula 3
     cout<<" suma de dos rectangulares\n";
     cout<<"*****************************************\n";
   //declaracion
     double f1,f2,g1,g2;
   //asignacion
     cout<<"Ingrese el x1 ", cin>>f1;
     cout<<"Ingrese el x2: ", cin>>f2;  
     cout<<"Ingrese el y1 ", cin>>g1;
     cout<<"Ingrese el y2: ", cin>>g2;          
   //proceso
   //resultado
     cout<<" Z= "<<g1+g2<<" +J "<<g1+g2<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     
     
     
     
   //formula 4
     cout<<" resta de dos rectangulares\n";
     cout<<"*****************************************\n";        
   //proceso
   //resultado
     cout<<" Z= "<<f1-f2<<" +J "<<g1-g2<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
         
    
    
    
    //formula 5
     cout<<" multiplicacion de dos polares\n";
     cout<<"*****************************************\n";
   //declaracion
     int R1,R2;
     double PHI1,PHI2;
   //asignacion
     cout<<"Ingrese el radio 1: ", cin>>R1;
     cout<<"Ingrese el angulo 1: ", cin>>PHI1;    
     cout<<"Ingrese el radio 2: ", cin>>R2;
     cout<<"Ingrese el angulo 2: ", cin>>PHI2;   
   //proceso
   //resultado
     cout<<" EL RADIO = "<< (R1*R2)<< " Y EL ANGULO: "<< (PHI1+PHI2)<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     
    
    
    
    //formula 6
     cout<<" division de dos polares\n";
     cout<<"*****************************************\n";
   //proceso
   //resultado
     cout<<" EL RADIO = "<< (R1/R2)<< " Y EL ANGULO: "<< (PHI1-PHI2)<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");
     
     
     
    //formula 7 
     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");
     
     
     
     
    //formula 8
     cout<<" resta de dos polares\n";
     cout<<"*****************************************\n";  
    //resta
    //resultado
     cout<<" Z= "<< xi-xii<<" + J  "<<yi-yii<<endl;
     cout<<"********************************\n";
     cout<<endl<<endl;
     //system("pause");    
     
     
     
     
    //formula 9
     cout<<" multiplicacion de dos rectangulares\n";
     cout<<"*****************************************\n";
   //declaracion
     int X1,X2,Y1,Y2;
     double PHI3,R3;
   //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");
     
     
     
     
    //formula 10
       cout<<" division de dos 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;
     cout<<"Cesar David Garcia Hidalgo\n";
     cout<<"IIIEE-2";
     //system("pause");
     return 0;
}//FIN

 

INFORME <<<<<<<<

bottom of page