top of page

#include <iostream>

#include <math.h>

using namespace std;

int main ()

{

cout<<"+++++++++++++++ MENU ++++++++++ \n";

cout<<"escoger una opcion\n ";

int opcion;

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

cout<<"2.-TABLA DE MULTIPLICAR \n";

cout<<"3.-GASES IDEALES \n";

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

cout<<"5.-FRECUENCIA ANGULAR \n";

cout<<"ingrese una opcion";

cin>>opcion;

switch ( opcion )

{

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

case 1:{

cout<<"SUMATORIA DE NUMEROS\n";

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

cout<<"Numero max, contara uno en uno, empezando 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 sumatoria de todos los numeros es: "<<s1<<endl;

cout<<"la sumatoria de S2 pares es: "<<s2<<endl;

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

cout<<"el factorial de lo numeros 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 aceleracion angular es: "<<a<<endl;

}

}

break;

}

}

bottom of page