top of page

#include<iostream>

#include<math.h>

using namespace std;

double Fx,R,Q;

double x,a,n,B,P,i;

double r,xl,xc,I,V;

double p,v,pi=3.14,m,G;

double PARABOLA(int a);

double RAIZ (int x,int y);

double CORRIENTE(int ñ,int l ,int u,int z)

double POTENCIA(int A,int b,int c)

int opcion;

int main ()

{

cout<<"MENU\n";

cout<<"PARABOLA:\n";

cout<<"PARABOLA 2:\n";

cout<<"RAIZ:\n";

cout<<"CORRIENTE:\n";

cout<<"CORRIENTE 2:\n";

cout<<"POTENCIA:\n";

cout<<"POTENCIA 2:\n";

cout<<"ingrese una opcion: ";

cin>> opcion;

switch(opcion)

{

case 1:

{

cout<<"PARABOLA\n";

Q= PARABOLA(x);

cout <<"para x: "<<x<<" el valor de f(x)= "<< r <<endl;

};break;

case 2:

{

for(x=-5;x<=5;x++)

{

R= PARABOLA(x);

cout <<"para x: "<<x<<" el valor de f(x)= "<< x <<endl;

}

};break;

case 3:

{

cout<<"RAIZ\n";

a=1;

cin>>n;

cin>>B;

do

{

R=RAIZ(a,B);

cout<<R<<endl;

a=a++;

} while(a<=n);

};break;

case 4:

{

cout<<"CORRIENTE\n";

cout<<"Ingrese el Voltaje: ";

cin>>V;

cout<<"Ingrese resistencia:";

cin>>r;

cout<<"Ingrese xl: "; cin>>xl;

cout<<"Ingrese xc: "; cin>>xc;

I=CORRIENTE(V,r,xl,xc);

cout<<I<<endl;

}

;break;

case 5:

{

cout<<"Ingrese xl:"; cin>>xl;

cout<<"Ingrese xc:"; cin>>xc;

for(V=8; V<=30; V=V+1)

for(r=10;r<=20; r=r+4)

{

I=CORRIENTE(V,r,xl,xc);

cout<<I<<endl;

}

}

;break;

case 6:

{

cout<<"POTENCIA\n";

cout<<"Ingrese el angulo:

";cin>>m;

cout<<"Ingrese voltaje :

";cin>>v;

cout<<"Ingrese intensidad:

";cin>>i;

P=POTENCIA(v,i,m);

cout<<P<<endl;

}

;break;

case 7:

{

cout<<"Ingrese el angulo:

";cin>>m;

for(v=1; v<=10; v=v++)

for(i=7; i<=25; i=i++)

{

P=POTENCIA(v,i,m);

cout<<P<<endl;

}

};break;

}

}

double PARABOLA(int a)

{

Q=(1/pow(a,2))+3;

return Q ;

} double RAIZ (int x,int y)

{

Q=pow(x,1/y);

return Q;

}

double CORRIENTE(int ñ,int l ,int u,int z)

{

I=ñ/(sqrt(pow(l,2)+(u+z,2)));

return I;

}

double POTENCIA(int A,int b,int c)

{

G=(2*pi*c/360);

P=A*b*(cos(G));

return P;

}

BLOG MICHAEL LOVERA 2018

bottom of page