#include<conio.
h>
#include<iostream.h>
int main (){
float a,b,c;
char opc,oper;
do
{
clrscr();
cout<<"****MENU PRINCIPAL****"<<endl;
cout<<"
"<<endl;
cout<<" (O)
OPERACIONES"<<endl;
cout<<" (A)
AREAS"<<endl;
cout<<" (S)
SERIES"<<endl;
cout<<" (T)
TERMINAR"<<endl;
cout<<" Escoge una opcion "<<endl;
cin>>opc;
if(opc =='O')
{
float a,b,c;
do{
clrscr();
cout<<"****MENU DE
OPERACIONES****"<<endl;
cout<<" (s)
SUMAR"<<endl;
cout<<" (r)
RESTAR"<<endl;
cout<<" (m)
MULTIPLICAR"<<endl;
cout<<" (d)
DIVIDIR"<<endl;
cout<<" (t)
TERMINAR"<<endl;
cout<<" Escoge una operacion "<<endl;
cin>>oper;
if(oper =='s')
{
cout<<" Escribe un entero :"<<endl;
cin>>a;
cout<<" Escribe otro entero "<<endl;
cin>>b;
c=a+b;
cout<<" La suma de " <<a<<"+"<<b<<" es
"<<c<<endl;
getch();
}
if(oper =='r')
{
cout<<" Escribe un entero :"<<endl;
cin>>a;
cout<<" Escribe otro entero "<<endl;
cin>>b;
c=a-b;
cout<<" La resta de " <<a<<"-"<<b<<" es
"<<c<<endl;
getch();
}
if(oper =='m')
{
cout<<" Escribe un entero :"<<endl;
cin>>a;
cout<<" Escribe otro entero "<<endl;
cin>>b;
c=a*b;
cout<<" La multiplicacion de "
<<a<<"*"<<b<<" es "<<c<<endl;
getch();
}
if(oper =='d')
{
cout<<" Escribe un entero :"<<endl;
cin>>a;
cout<<" Escribe otro entero "<<endl;
cin>>b;
c=a/b;
cout<<" La division de " <<a<<"/"<<b<<" es
"<<c<<endl;
getch();
}
}
while (oper !='t');
}
if(opc =='A')
{
float area,b,h;
do{
clrscr();
cout<<"****MENU DE AREAS****"<<endl;
cout<<" (m)
CUADRADO"<<endl;
cout<<" (n)
TRIANGULO"<<endl;
cout<<" (p)
CIRCUNFERENCIA"<<endl;
cout<<" (q)
RECTANGULO"<<endl;
cout<<" (t)
TERMINAR"<<endl;
cout<<" Escoge una operacion "<<endl;
cin>>oper;
if(oper == 'm')
{
cout<<" Escribe el lado del cuadrado :"<<endl;
cin>>b;
area=b*b;
cout<<" El area del cuadrado es: "
<<area<<endl;
getch();
}
if(oper == 'n')
{
cout<<" Escribe la base del triangulo :"<<endl;
cin>>b;
cout<<" Escribe la altura del triangulo :
"<<endl;
cin>>h;
area=b*h*0.5;
cout<<" El area del triangulo es: "
<<area<<endl;
getch();
}
if(oper == 'p')
{
cout<<" Escribe el radio de la
circunferencia :"<<endl;
cin>>b;
area=b*b*3.1415;
cout<<" El area de la circunferencia es: "
<<area<<endl;
getch();
}
if(oper == 'q')
{
cout<<" Escribe la base del rectangulo:
"<<endl;
cin>>b;
cout<<" Escribe la altura del rectangulo:
"<<endl;
cin>>h;
area=b*h;
cout<<" El area del rectangulo es:
"<<area<<endl;
getch();
}
}
while ( oper !='t');
}
if(opc =='S')
{
do{
clrscr();
cout<<"****MENU DE SERIES****"<<endl;
cout<<" (f)
FIBONACCI"<<endl;
cout<<" (n)
NUMEROS
NATURALES"<<endl;
cout<<" (c)
NUMEROS
IMPARES"<<endl;
cout<<" (t)
TERMINAR"<<endl;
cout<<" Escoge una opcion "<<endl;
cin>>oper;
if (oper== 'f')
{
int numero;
int ant1=0,ant2=1,fibo;
cout<<"Indique el numero de terminos de la
serie:\n"<<endl;
cin>>numero;
for (int i=0;i<numero;i++){
fibo=ant1;
cout<<ant1<<"\t";
ant1=ant2;
ant2=fibo+ant2;
}
getch ();
}
if (oper== 'n')
{
int numero;
cout<<"Indique el numero de terminos de la
serie:\n"<<endl;
cin>>numero;
for(int i=1;i<=numero;i++){
cout<<i<<"\t";
}
getch ();
}
if (oper== 'c')
{
int numero;
cout<<"Indique el numero de terminos de la
serie:\n"<<endl;
cin>>numero;
for(int i=1;i<=numero;i++){
cout<<(2*i-1)<<"\t";
}
getch ();
}
}
while (oper !='t');
}
}
while (opc !='T');
}