
#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 f,int g,int h,int w);
double POTENCIA(int j,int k,int l);
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 V: "; cin>>V;
cout<<"Ingrese r:"; cin>>r;
cout<<"Ingrese xl: "; cin>>xl;
cout<<"Ingrese xc: "; cin>>xc;
I=CORRIENTE(xl,xc,v,r);
cout<<I<<endl;
}
;break;
case 5:
{
cout<<"Ingrese xl:"; cin>>xl;
cout<<"Ingrese xc:"; cin>>xc;
for(xl=-6; xl<=6; v=v+1)
for(xc=10;xc<=20; r=r+4)
{
I=CORRIENTE(V,r,xl,xc);
cout<<I<<endl;
}
}
;break;
case 6:
{
cout<<"POTENCIA\n";
cout<<"Ingrese el angulo: ";cin>>a;
cout<<"Ingrese voltaje : ";cin>>v;
cout<<"Ingrese intensidad: ";cin>>i;
P=POTENCIA(v,i,a);
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 f,int g,int h,int w)
{
I=f/sqrt(pow(g,2)+pow((h+w),2));
return I;
}
double POTENCIA(int j,int k,int l)
{
R=(2*pi*l)/360;
P=j*k*(cos(R));
return P;
}