
#include <iostream>
#include <math.h>
using namespace std;
int main ()
{
int opcion;
cout<<"+++Menu+++ \n";
cout<<"escoger una eleccion\n ";
cout<<"1.-SUMA\n";
cout<<"2.-TABLA DE MULTIPLICAR \n";
cout<<"3.-GASES IDEALES \n";
cout<<"4.-FUNCIONES \n";
cout<<"5.-FRECUENCIA ANGULAR \n";
cout<<"ingrese una eleccion";
cin>>opcion;
switch ( opcion )
{
case 1:
{
cout<<"SUMA DE Nº\n";
double n,s1,s2,s3,m,M;
cout<<"Nº max,contara 1 en 1,desde 1\n";cin>>M;
for (n=1;n<=M;n++)
{
s1=s1*n;
s2=s2*(n*2);
s3=s3*(2*n-1);
m=m*n;
cout<<"la suma de todos los nº es: "<<s1<<endl;
cout<<"la suma de S2 pares es: "<<s2<<endl;
cout<<"la suma de S3 impares es: "<<s3<<endl;
cout<<"el factorial de lo nº es: "<<m<<endl;
}
}
break;
case 2:
{
cout<<"TABLE DE MULTIPLICAR \n";
double i,j,min,max;
cin>>min;
cin>>max;
for (i=min;i<=max;i=i++)
for (j=min;j<=max;j=j++)
{
cout<<"i"<< "*" << "j"<< "=" << "i*j" <<endl;
}
}
break;
case 3:
{
cout<<"GASES IDEALES \n";
double p1,a,p2,t1,t2,v1,v2;
cout<<"ingresar t1"; cin>>t1;
cout<<"ingresar t2"; cin>>t2;
cout<<"ingresar p2"; cin>>p2;
for (v1=10;v1<=20;v1=v1+2)
for (v2=5;v2<=25;v2=v2+5)
{
a=(p2*v2)/t2;
p1=(a*t1)/v1;
cout<<"gases:"<<p1<<endl;
}
}
break;
case 4:
{
int x,min,max,r;
double f,pi=3.14;
cin>>min;
cin>>max;
for(x=min;x<=max;x=+4)
{
r=(2*pi*x)/360;
f=(cosh(r))-(sin(r));
cout<<f<<endl;
}
}
break;
case 5:
{
cout<<"FRECUENCIA ANGULAR\n";
double a,t,wf,wi;
cout<<"tiempo: ";cin>>t;
for (wf=20;wf<=50;wf=wf+5)
for (wi=10;wi<=50;wi=wi+10)
{
a=(wf-wi)/t;
cout<<"l velocidad angular es: "<<a<<endl;
}
}
break;
}
}