#include <conio.h>
#include <math.h>
#include <stdlib.h>
using namespace std;
// variables globales
return a;
}
int main()
{int a,b,c;
char oper, ope;
long double facto;
ope=getch();
if(ope=='s')
{ system("cls");
cout<<" Suma "<<endl;
a=Entre(0,100);
b=Entre(52,300);
c=a+b;
//****************************************************
//********************Multiplicacion**************************
if(ope=='m')
{ system("cls");
cout<<" Multiplicacion "<<endl;
a=Entre(0,100);
b=Entre(52,300);
c=a*b;
//****************************************************
//********************Division**************************
if(ope=='d')
{ system("cls");
cout<<" Division "<<endl;
a=Entre(0,100);
b=Entre(1,300);
c=a/b;
cout<<" El cociente de "<<a<<" / "<<b<<" es "<<c<<endl;
getch();
}
//****************************************************
//*********Series***********************
if(ope=='i')
{ system("cls");
cout<<" Serie de Fibonacci"<<endl;
fibo();
}
if(ope=='a')
{ system("cls");
cout<<" Factorial"<<endl;
a=Entre(1,1750);
facto=factor(a);
cout<<" El factorial de "<<a<< " es "<< facto<<endl;
getch();
}
if(ope=='n')
{ cout<<" Desarrollar Serie de Naturales"<<endl;getch();
}
if(ope=='c')
{ cout<<" Desarrollar Serie de Cubos"<<endl;getch();
}
//**********************************
//*********Areas***********************
if(ope=='4')
{ cout<<" Area del Cuadrado"<<endl;
a= Entre(1, 542);
cout<< " el Area de un cuadrado de "<<a<<" de Lado es "<<a*a<<endl;
getch(); }
if(ope=='6')
{ cout<<" Desarrollar Rectangulo"<<endl;
getch(); }
if(ope=='3')
{ cout<<" "<<endl;
AreaT3();
}
if(ope=='p')
{ cout<<" Desarrollar Circulo"<<endl;
getch(); }
//**********************************
}while ( ope!='f');
fact=1;
for(int j=1;j<a+1;j++)
{fact=fact*j; }
// cout<<" el factorial de "<<a<<" es "<<fact;
// getch();
return fact;
}
//*********************************************************
void fibo()
{ double n,numero, n0,n1;
//inicio
cout<<" Cuantos Elementos quieres generar entre 3 y 1477 "<<endl;
n=Entre(3,1477);
cout<<" Elemento 1 = 0 "<< endl;
cout<<" Elemento 2 = 1 "<<endl;
n0=0;
n1=1;
//Proceso
for(int c=3; c<=n; c++)
{
numero=n1+n0;
cout<<" Elemento "<<c<<" = " <<numero<<endl;
n0=n1;
n1=numero;
};
getch();
}
//********************************************************
void AreaT3()
x1=b+c;
x2=abs(b-c);
aux=(b+c+d)/2 ;
a=sqrt( aux*(aux-b)*(aux-c)*(aux-d));
// cout<<" a = "<<a<<" b "<<b<<" c = "<<c<<" aux ="<<aux<<endl;
cout<<" el area del triangulo es " <<a;
getch();
}
};