elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Mensajes
Páginas: [1]
1  Programación / Programación C/C++ / HOLA A TODOS, POR FAVOR NECESITO QUE ME AYUDEN A TERMINAR ESTE EJERCICIO en: 25 Octubre 2011, 07:10 am
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{  int a,b,c,oper,fin,arit;
int series,fib0,fib1,fib, nat,cub,;
   do  {
    do{     system("cls");
    cout<<"  Operaciones Aritmeticas            1 "<<endl;
    cout<<"  Series                             2 "<<endl;
    cout<<"  Matrices                           3  "<<endl;
    cout<<"  Funciones                          4"<<endl;
    cout<<"  "<<endl;cout<<"  "<<endl;
    cout<<"  Terminar                           5 "<<endl;
    cin>>oper;
} while((oper <=0) || (oper>=6));

fin=oper;

switch(oper){
             
 case 1: cout<<"Operaciones"<<endl;
  do {
     do{     system("cls");
            cout<<"  Sumar                  1 "<<endl;
            cout<<"  Restar                 2 "<<endl;
            cout<<"  Multiplicar            3  "<<endl;
            cout<<"  Dividir                4"<<endl;
            cout<<"  "<<endl;
            cout<<"  "<<endl;
            cout<<"  Regresar               5 "<<endl;
            cout<<"  Terminar               6 "<<endl;
            cin>>arit;
            if (arit==6){exit(0);}
       }
      while((arit <=0) || (arit>=6));
     
   if (arit==1){     system("cls");
                     cout<<"  Sumar                   "<<endl;
                      cout<<"  "<<endl;cout<<"  "<<endl;
                     cout<<" Ingresa un entero  "<<endl;
                     cin>>a;
                     cout<<" Ingresa otro entero  "<<endl;
                     cin>>b;
                     c=a+b;
                     cout<<" La suma  es    "<<c<<endl;
                     system("PAUSE");
               }
     if (arit==2){   system("cls");
                     cout<<"  Restar                   "<<endl;
                     cout<<"  "<<endl;cout<<"  "<<endl;
                     cout<<" Ingresa un entero  "<<endl;
                     cin>>a;
                     cout<<" Ingresa otro entero  "<<endl;
                     cin>>b;
                     c=a-b;
                     cout<<" La diferencia  es    "<<c<<endl;
                     system("PAUSE");
               } 
       
                 
   }  while(arit!=5);
   
                 
 break;   
            case 2: cout<<"Series"<<endl;
           
         do {
     do{     system("cls");
            cout<<"  Fibonacci           1 "<<endl;
            cout<<"  Naturales           2 "<<endl;
            cout<<"  Cuadrados           3  "<<endl;
            cout<<"  Cubos               4"<<endl;
            cout<<"  "<<endl;cout<<"  "<<endl;
            cout<<"  Regresar            5 "<<endl;
            cout<<"  Terminar            6 "<<endl;
            cin>>series;
            if (series==6){exit(0);}
       }
      while((series <=0) || (series>=6));
     
   if (series==1){     system("cls");
                     cout<<" Fibonacci                   "<<endl;
                      cout<<"  "<<endl;cout<<"  "<<endl;
                      fib0=0;  fib1=1;
                      cout <<"      "<<fib0<<endl;
                      cout <<"      "<<fib1<<endl;
                     for ( int k=2; k<=9; k++)
                     {
                         fib=fib0+fib1;
                         fib0=fib1;
                         fib1=fib;
                         cout <<"      "<<fib1<<endl;
                      }
                     system("PAUSE");
               }
     if (series==2){   system("cls");
                     cout<<"  Naturales                   "<<endl;
                     cout<<"  "<<endl;cout<<"  "<<endl;
                     cout<<" Ingresa un entero  "<<endl;
                     cin>>a;
                     cout<<" Ingresa otro entero  "<<endl;
                     cin>>b;
                     c=a-b;
                     cout<<" La diferencia  es    "<<c<<endl;
                     system("PAUSE");
               } 
       
                 
   }  while(series!=5);   
           
           
           
                 
              break;
              case 3: cout<<"Matrices"<<endl;
                 
              break;
              case 4: cout<<"Funciones"<<endl;
                 
              break;
                       
            }


   
  // system("cls");
  //  exit(0);
    system("PAUSE");
   // return EXIT_SUCCESS; 
}  while(fin!=5);
}


  :D  SI ALGUIEN PUEDE AYUDARMA SE LO AGRADECERE MUCHO YA QUE MI EXAMEN ES EN 24 HORAS Y NO ENTIENDO NADA, SI LO PODRIAN EXPLICAR Y TERMINAR.

GRACIAS Y QUE DOS TE VENDIGA
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines