#include<iostream>
#include<math.h>
using
namespace std;
int opcion;
int main()
{
do
{
int opcion;
cout<<"menu\n";
cout<<"1.problema\n";
cout<<"2.eficiencia/n"<<endl;
cout<<"3.temperatura/n"<<endl;
cout<<"4.efecto/n"<<endl;
cout<<"ingrese una opcion";cin>>opcion;
cin>>opcion;
switch (opcion)
{
case 1:
{
int v1,v2,h1;
double H2;
cout<<"ingrese
v1"<<endl;
cout<<"ingrese
v2"<<endl;
cin>>v1; cin>>v2;
for(h1=1; h1<=15;h1++)
{
H2=h1-((pow(v2,2)-pow(v1,2))/2);
cout<<"valor
de H2"<<H2<<endl;
}
};break;
case 2:
{
int t2,t1,t3,k,M;
// cout<<"ingrese
valor t1"<<endl;
//cout<<"ingrese
valor t2"<<endl;
//cout<<"ingrese
valor t3"<<endl;
t1=5; t2=10; t3=15;
for(k=1;k<=20;k++)
M=1-t2-t1/k*(t3-t1);
cout<<"valor de M"<<M<<endl;
};break;
case 3:
{
int t2,t1,Tf;
cout<<"ingrese
valor t2"<<endl;
t2=20;
for(t1=1;t1<=15;t1++)
{
Tf=t2-t1/(t2/t1);
cout<<"valor de
Tf"<<Tf<<endl;
}
};break;
case 4:
{
double pi=3.14,Y;
int v;
for(v=1;v<=13;v++)
{
Y=1-pow((1/pi),((v+1)/v));
cout<<"valor de Y"<<Y<<endl;
}
};break;
}//fin switch
}while(opcion =!0);
system ("pause");
return 0;
}
No hay comentarios:
Publicar un comentario