top of page

LABORATORIO 1

#include <iostream>
#include<math.h>
using namespace std;
double R,R1,R2,Q;
int x,y,b,t,m,e,base,v;
double HIPERBOLA (int a);
double RADICAL (int x ,int y);
double CAPACITANCIA (int x , int y);
double INDUCTANCIA (int x , int y);
int main()
{int opcion;
do
{cout<<"MENU \n";
cout<<" 1.- Hiperbola \n";
cout<<" 2.- Radicacion \n";
cout<<" 3.- Potencia capacitiva \n";
cout<<" 4.- Potencia inductiva \n";
cout<<"ingrese la opcion : \n";
cin>>opcion;
switch (opcion)
{
case 1:
{
cout<<"Hiperbola"<<endl;
cout<<"Ingrese la variable"; cin>>x;
R=HIPERBOLA(x);
cout<<"la hiperbola es: " ; cout<<R<<endl;
};break;
case 2:
{
cout<<"RADICAL"<<endl;
cout<<"Ingrese la base"; cin>>b;
cout<<"Ingrese elmaximo"; cin>>m;
cout<<"Ingrese el exponente" ; cin>>e;
base=1;
R=RADICAL(b,e);
cout<<"el radical es" ; cout<<R;
do
{
R=RADICAL(base,e);
cout<<"el radical es: " ; cout<<R<<endl;
base=base+1;
} while (base<=m);
};break;
case 3:
{
cout<<"CAPACITANCIA"<<endl;
cout<<"Ingrese el voltaje"; cin>>v;
cout<<"Ingrese el angulo" ; cin>>t;
R1=CAPACITANCIA(v,t);
cout<<"la capacitancia es: "; cout<<R1;
{
double v,t;
for(v=1;v<=40;v=v+4)
for(t=1;t<=50;t=t+5)
R1=CAPACITANCIA(v,t);
cout<<"la capacitancia es: "; cout<<R1<<endl;
}
};break;
case 4:
{
cout<<"INDUCTANCIA"<<endl;
cout<<"Ingrese el voltaje"; cin>>v;
cout<<"Ingrese el angulo"; cin>>t;
R2=INDUCTANCIA(v,t);
cout<<"la inductancia es: "; cout<<R2;
{
double v,t;
for(v=2; v<=250; v++)
for(t=3; t<=350;t= t+15)
{
R2=INDUCTANCIA(v,t);
cout<<"la inductancia es: " ; cout<<R2<<endl;
}
}
};break;
}//finswitch
}while (opcion=!0);
}//finprograma
double HIPERBOLA (int a)//hiperbola
{
y=(1/pow(a,2))+4;
return y;
}
double RADICAL (int x ,int y)//radical
{
Q=pow(x,y);
return Q;
}
double CAPACITANCIA (int x , int y)//potencia capacitiva
{
R=(2*3.1416+y)/360;
Q=x*sin(R);
return Q;
}
double INDUCTANCIA (int x , int y)//potencia inductiva
{
R=(2*3.1416+y)/360;
Q=x*cos(R);
return Q;
}

  • Facebook Social Icon
  • Twitter Social Icon
  • Google+ Social Icon
  • YouTube Social  Icon
  • Pinterest Social Icon
  • Instagram Social Icon

© 2023 por CuleLapaJhonatan. Creado con Wix.com

bottom of page