top of page
Buscar
  • Foto del escritor: Oscar Anthonny Echegaray Neyra
    Oscar Anthonny Echegaray Neyra
  • 26 jun 2018
  • 1 Min. de lectura

#include<iostream>

#include<math.h>

using namespace std;

double W,m,P,V1,V2;

double w,v1,v2,Po,vol;

double H2,H1=283.14,Vo,Vl;

double COP,TH,TL;

double VAP();

double TRABAJO();

double ENTALPIA();

double DESEM();

int opcion;


int main ()

{

cout<<"*******MENU*******\n";

cout<<"1.- trabajo \n";

cout<<"2.- proceso politropico \n";

cout<<"3.-entalpia \n";

cout<<"4.-coeficiente de desempeño \n";

cout<<"ingrese una opcion: ";

cin>> opcion;

switch(opcion)

{

case 1:

{

VAP();

};break;

case 2:

{

TRABAJO();

};break;

case 3:

{

ENTALPIA();

};break;

case 4:

{

DESEM();

};break;

}//fin switch

}//fin proceso

double VAP()

{

cout<<"ingrese valor de la presion: ";cin>>P;

cout<<"ingrese valor del volumen 2: ";cin>>V2;

cout<<"ingrese la masa: ";cin>>m;

V1=1;

while(V1<=10)

{

W=m*P*(V2-V1);

cout<<W<< endl;

V1=V1+2;

}

}

double TRABAJO ()

{

cout<<"ingresar la masa: "; cin>>m;

cout<< "ingresar la presion: "; cin>>Po;

for(v1=2; v1<=8; v1=v1++)

for(v2=4; v2<=10; v2=v2+4)

{

w=m*Po*(v2-v1);

cout<<w<<endl;

}

}

double ENTALPIA()

{

cout<<"ingrese Vo: ";cin>>Vo;

Vl=4;

while(Vl<=12)

{

H2=H1-((Vo-Vl)/2);

Vl=Vl+5;

cout<<H2<<endl;

}

}


double DESEM()

{

cout<<"ingrese TH: ";cin>>TH;

for(TL=2; TL<=20; TL=TL+3)

{

COP=1/((TH/TL)-1) ;

cout<<COP<<endl;

}

}



 
 
 
  • Foto del escritor: Oscar Anthonny Echegaray Neyra
    Oscar Anthonny Echegaray Neyra
  • 19 jun 2018
  • 1 Min. de lectura

#include<iostream>

#include<math.h>

using namespace std;

//zona publica

double R,Q,pi=3.14,Qc,Qi, T, a, y;

double HIPERBOLA(int a);

double raiz (int x,int y);

double capacitancia(int v,int q);

double inductancia(int a,int b);

int x,v,p,v1,q,m,b, max1;

int main ()

{

int opcion;

do

{

cout<<"*******MENU*******\n";

cout<<"1.- hiperbola \n";

cout<<"2.- radical \n";

cout<<"3.- capacitancia \n";

cout<<"4.- inductancia \n";

cout<<"ingrese una opcion: ";

cin>> opcion;

switch(opcion)

{

case 1:

{

cout<<"----HIPERBOLA----\n";

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

{

R= HIPERBOLA(x);

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

}

};break;

case 2:

{

cout<<"-----RADICAL-----\n";

x=1;cin>>y;

do

{

R=pow(x,1/y);

cout<<R<<endl;

x=x+1;

} while(x=20);

};break;

case 3:

{

cout<<"-----CAPACITANCIA-----\n";

// cout<<"ingrese el valor del voltaje: ";cin>>v;

cout<<"ingrese el valor maximo: "; cin>>max1;

cout<< "ingresar el angulo: ";cin>>q;

v=100;

do

{

Qc=capacitancia(v,q);

cout << Qc << endl;

v=v+2;

}while(v<=max1);

};break;

case 4:

{

cout<< "-----INDUCTANCIA-----\n";

for(v1=5; v1<=60; v1=v1+5)

for (p=2; p<=8; p++)

{

Qi=inductancia(v1,p);

cout<< Qi << endl;

}

};break;

}//fin switch

} while(opcion=!0);

}//fin proceso



double HIPERBOLA(int a)

{

y=(1/pow(a,2))+4;

return y;

}

double raiz (int a,int b)

{

Q=pow(x,1/y);

return Q;

}

double capacitancia(int V,int q)

{

a=(q*2*pi)/180;

Qc= v*sin(a);

return Qc;

}

double inductancia(int a,int b)

{

R=(b*2*pi)/180;

Qi= a*cos(R);

return Qi;

}

 
 
 
  • Foto del escritor: Oscar Anthonny Echegaray Neyra
    Oscar Anthonny Echegaray Neyra
  • 12 jun 2018
  • 1 Min. de lectura

//osciladores

#include <iostream>

#include <math.h>

using namespace std;

int main ()

{

cout<<"******** MENU ********\n";

cout<<"escoger una opcion\n ";

int opcion;

cout<<"1.- sumatoria de núeros \n";

cout<<"2.- aceleracion angular \n";

cout<<"3.- frecuencia angular \n";

cout<<"4.- periodo \n";

cout<<"5.- frecuencia \n";

cout<<"ingrese una opcion";

cin>>opcion;

switch ( opcion )

{

//////////////////////////////////////////////////////////////////////////////////

case 1:{

cout<<"~~~~~SUMATORIA DE NUMEROS~~~~~~\n";

double n,s1,s2,s3,f,m;

cout<<"escribir un numero max, se contara de uno en uno, empzando desde 1.\n";cin>>m;

for (n=1;n<=m;n++);

{

s1=s1*n;

s2=s2*(n*2);

s3=s3*(2*n-1);

f=f*n;

cout<<"la sumatoria de todos los numeros es: "<<s1<<endl;

cout<<"la sumatora de los numeros pares es: "<<s2<<endl;

cout<<"la sumatoria de los numeros impares es: "<<s3<<endl;

cout<<"el factorial de lo numeros es: "<<f<<endl;

}

};break;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

case 2:

{

cout<<"~~~~~~ACELERACION ANGULAR~~~~~~\n";

double a,t,w,f,i;

cout<<"ingresar w: ";cin>>w;

cout<<"tiempo: ";cin>>t;

for (w=8;w<=20;w=w+3);

for (i=6;i<=25;i=i+4);

{

a=(w*f)-(w*i)/t;

cout<<"l aceleracion angular es: "<<a<<endl;

}

};break;

//////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////

case 3:{

cout<<"~~~~~~FRECUENCIA ANGULAR~~~~~~~\n";

double w,k,m;

for (k=3;k<=10;k++);

for (m=2;k<=40;m=m+5);

{

w=sqrt(k/m);

cout<<"la frecuencia angular cakculada es: "<<w<<endl;

}

}break;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

case 4:{

cout<<"~~~~~~~CALCULO DEL PERIODO~~~~~~~~\n";

double t,m,k,pi=3.14;

for (k=1;k<=30;k++);

for (m=2;k<=20;m=m+7);

{

t=(2*pi)*sqrt(m/k);

cout<<"el periodo calculado es: "<<t<<endl;

}

};break;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

case 5:{

cout<<"~~~~~~~~~FRECUNCI ANGULAR~~~~~~~~\n";

double f,pi=3.14,k,m;

for (k=10;k<=30;k++);

for (m=2;k<=10;m=m+2);

{

f=(1/(2*pi))*sqrt(k/m);

cout<<"la frecuancia calculada es: "<<f<<endl;

}

};break;

}

}

 
 
 

© 2018 by Oscar. Proudly created with Wix.com

bottom of page