Tema: exponente
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/07/2010, 11:00
sam90
 
Fecha de Ingreso: abril-2010
Ubicación: Rosario
Mensajes: 1.850
Antigüedad: 14 años, 5 meses
Puntos: 228
Respuesta: exponente

Código C++:
Ver original
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6. int a;
  7. int b,z;
  8. float c;
  9. int potencia(int a, int b,float c)
  10. {
  11.       cout<<"Escribe un numero:";
  12.       cin>>a;
  13.       cout<<"Escribe su exponente";
  14.       cin>>b;
  15.       c = (float) pow(a,b);
  16.       cout<<c;
  17.       system("pause");
  18.       }
  19.        
  20. main()
  21. {
  22.     cout<<"Este programa calcular cuadrados.\n";
  23.     cin>>z;
  24.     if(z==1)  
  25.           potencia(a, b, c);
  26.     system("PAUSE");
  27.     return EXIT_SUCCESS;
  28. }

Podes transcribir el error del compilador...