top of page
  • Facebook
  • Twitter
  • Google+
  • YouTube
  • Pinterest
  • Instagram
piel-electronica.jpg

ESTRUCTURAS

CONDICIONALES

 

c++

​

  • Estructura condicional simple (if)

  • Estructura condicional doble (if - else)

​

​                                            TARQUI BORDDA RIK

descarga.jpg
insignia FIME.jpg

inductancia

formula4.gif


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


cout<<endl<<endl;
cout <<  " ******** NUMERO DE ESPIRAS ********\n " ;
cout<<endl<<endl;
int coe;
double n,s,l,u;

 //Asignacion
 cout<<"Ingrese el coeficiente de automatizacion (coe):  ";cin>>coe;
 cout<<"Ingrese la seccion (s):  ";cin>>s;
  cout<<"Ingrese el largo de la bobina (l):  ";cin>>l;
    cout<<"Ingrese el coeficiente de permeabilidad(u):  ";cin>>u;

if(s<10){
    if(u!=0){
        
            n=sqrt(pow(10,8)*l*coe)/(1.257*s*u);
        cout<<"el numero de espiras es:   "<<n<<endl;
    }
    else {
    
    cout<<endl;
    cout<<"el numero es imaginario"<<endl;}
}
else  
{

cout<<endl;
cout<<" la seccion esta fuera de rango"<<endl;

}    

}

Capturarrr.PNG
err.PNG
aa.PNG


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


cout<<endl<<endl;
cout <<  " ******** INDUCTANCIA ********\n " ;
cout<<endl<<endl;
int coe;
double n,s,u,l;

 //Asignacion
 cout<<"Ingrese el numero de espiras (n):  ";cin>>n;
 cout<<"Ingrese la seccion (s):  ";cin>>s;
  cout<<"Ingrese el largo de la bobina (l):  ";cin>>l;
   cout<<"Ingrese el coeficiente de permeabilidad(u):  ";cin>>u;
if(l!=0){
    if(n>4){
        coe=1.257*pow(n,2)*s/pow(10,8)*l*u;
        
        cout<<"el coeficiente de autoinduccion es:   "<<coe<<endl;
    }
    else {
    
    cout<<endl;
    cout<<"el numero de espiras es pequeño"<<endl;}
}
else  
{

cout<<endl;
cout<<" el largo de la bobina != a 0"<<endl;

}    

}

Captura.PNG
Capturasw.PNG


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


cout<<endl<<endl;
cout <<  " ******** SECCION QUE COMPRENDE UNA ESPIRA ESPIRAS ********\n " ;
cout<<endl<<endl;
int coe;
double n,s,l,u;

 //Asignacion
 cout<<"Ingrese el coeficiente de automatizacion (coe):  ";cin>>coe;
 cout<<"Ingrese el numero de espiras(n):  ";cin>>n;
  cout<<"Ingrese el largo de la bobina (l):  ";cin>>l;
    cout<<"Ingrese el coeficiente de permeabilidad(u):  ";cin>>u;
if(n!=0){
    if(l>4){
    s=(pow(10,8)*l*coe)/(1.257*pow(n,2)*u);
            
        cout<<"la seccion  es:   "<<s<<endl;
    }
    else {
    
    cout<<endl;
    cout<<"el largo de la bobina es menor"<<endl;}
}
else  
{

cout<<endl;
cout<<" es imaginario"<<endl;

}    

}
 

qqqq.PNG
Captura.PNG


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


cout<<endl<<endl;
cout <<  " ******** LARGO DE LA BOBINA ********\n " ;
cout<<endl<<endl;
int coe;
double n,s,l,u;

 //Asignacion
 cout<<"Ingrese el coeficiente de automatizacion (coe):  ";cin>>coe;
 cout<<"Ingrese la seccion(s):  ";cin>>s;
  cout<<"Ingrese el numero de espiras (n):  ";cin>>n;
    cout<<"Ingrese el coeficiente de permeabilidad(u):  ";cin>>u;
if(coe!=0){
    if(25<s<=54){
    l=1.25*(pow(n,2)*s)/(pow(10,8)*coe)*u;
            
        cout<<"el largo de la bobina es :   "<<l<<endl;
    }
    else {
    
    cout<<endl;
    cout<<"el largo de la bobina es menor"<<endl;}
}
else  
{

cout<<endl;
cout<<" es imaginario"<<endl;

}    

}

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