top of page

electricidad y electromagnetismo

#include<iostream>
#include<math.h>
using namespace std;
int main() 
{

cout<<"ELECTRICIDAD Y ELECTROMAGNETISMO \n" ;
cout<<"******************************** \n" ;

int K,q1,q2,d,F;
cout<<"(1)LEY DE COULOMB \n" ;
cout<<"Ingrese Fuerza de atraccion : "; cin>> K ;
 if (K>20 && K<50)
 {
     cout<<"Ingrese carga1 : "; cin>> q1 ;
     cout<<"Ingrese carga2 : "; cin>> q2 ;
     cout<<"Ingrese distancia : "; cin>> F ;
     F=(K*q1*q2)/pow(d,2);
     cout<<"La Fuerza de atraccion es :" << K <<endl;
      
 }
 else
 cout<< "Valor fuera de rango";
 cout<<endl<<endl;

 

 int E,K1,PI=3.141592 ;
 cout<<"(2)CONSTANTE DIELECTRICA \n" ;
 cout<<"************************ \n" ;
 cout<<"Ingrese K1 : "; cin>> K1 ;
 
 E=K1*PI;
 if (E<40)
 {
     cout<<"La constante dielectrica es :" << E <<endl;
     
 }
 else
 cout<<"Valor fuera de rango";
 cout<<endl<<endl;
 
 
 
  int Q,V;
  double C;
 cout<<"(3)CAPACIDAD ELECTRICA \n" ;
 cout<<"*********************** \n" ;
 cout<<"Ingrese carga : "; cin>> Q ;
 cout<<"Ingrese voltaje: "; cin>> V ;

 if (V>10 && V<90)
 {
      C = Q/V ;
     cout<<"La carga es :" << C <<endl;
     
 }
 else
 cout<<"Valor fuera de rango";
 cout<<endl<<endl;
 
 
 
 return 0;
 

 

}

© 2023 by Name of Site. Proudly created with Wix.com

  • Facebook Social Icon
  • Twitter Social Icon
  • Instagram Social Icon
bottom of page