top of page

#include <iostream>
#include <math.h>
using namespace std;
 int main ()
{
    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:{ 
double n,r1,r2,r3,m,M;
cout<<"Numero max, contara uno en uno, empezando desde 1\n";cin>>M; 
    for (n=1;n<=M;n++)
    {
    r1=r1*n;
    r2=r2*(n*2);
    r3=r3*(2*n-1);
    m=m*n;
    cout<<"la sumatoria es :                       "<<r1<<endl;
    cout<<"la sumatoria de r2 pares   es:         "<<r2<<endl;
    cout<<"la sumatoria de r3 impares es:         "<<r3<<endl;
    cout<<"el factorial es:                          "<<m<<endl;
    }
}
break;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
case 2:{
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:{
    double p1,a,p2,t1,t2,v1,v2;
cout<<"tiempo 1"; cin>>t1;
cout<<"tiempo 2"; cin>>t2;
cout<<"ingresar p2"; cin>>p2;
    for (v1=5;v1<=10;v1=v1+4)
    for (v2=2;v2<=15;v2=v2+6)
    {
        a=(p2*v2)/t2;
        p1=(a*t1)/v1;
        cout<<p1<<endl;
    }
}
break;
case 4:{
int x,min,max,p;
double f,pi=3.14;
cin>>min;
cin>>max;
    for(x=min;x<=max;x=+4)
    {
        p=(2*pi*x)/360;
        f=(cosh(p))-(sin(p));
        cout<<f<<endl;
    }
}
break;
case 5:{
  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