top of page

#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;

}

}

bottom of page