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,o; 
double PARABOLA(int a);        
double RAIZ (int x,int y);
double CORRIENTE(int f,int g ,int h,int j)
double POTENCIA(int w,int e,int r)
int opcion;

int main ()
{
    cout<<"MENU\n";
    cout<<"parabola:\n";
    cout<<"parabola:\n";
    cout<<"racional:\n";
    cout<<"corriente:\n";
    cout<<"corriente bucle:\n";
    cout<<"potencia:\n";
    cout<<"potencia bucle:\n";    
    cout<<"ingrese una opcion: ";
    cin>> opcion;
    switch(opcion)
          {
              case 1:
                  {
                      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 << x <<endl;
                      }
                  };break;
             case 3:
             {
        
                 a=1;
                 cin>>n;
                cin>>B;
               do
                 {
                     R=RAIZ(a,B);
                     cout<<R<<endl;
                     a=a+4;
                 } while(a<=n);
             };break;    
                 case 4:
                  {
                
                     cin>>V;
                     cin>>r;
                     cin>>xl;
                     cin>>xc;
                    I=CORRIENTE(V,r,xl,xc);
                      cout<<I<<endl;
                  }
                  ;break;
                      case 5:
                  {    
                    cin>>xl;
                    cin>>xc;
                    for(V=10; V<=40; V=V+6)
                       for(r=30;r<=50; r=r+2)
                      {
                      I=CORRIENTE(V,r,xl,xc);
                      cout<<I<<endl;
                        }
                  }
                  ;break;
                          case 6:
                  {
                 
                cin>>m;
                cin>>v;
                cin>>i;

                    P=POTENCIA(v,i,m);
                      cout<<P<<endl;
                  }
                  ;break;
                      case 7:    
                  {    
                    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 j)
{
    I=f/(sqrt(pow(g,2)+(h+j,2)));
    return I;
}
double POTENCIA(int w,int e,int r)
{
    o=(2*pi*r/360);
    P=w*e*(cos(o));
    return P;
}

bottom of page