#include <iostream.h>
#include <conio.h>
#pragma hdrstop
//prototypy przeładowywanej funkcji power()
unsigned int power(unsigned int x, unsigned int y);
double power(double dx, unsigned long dy);

int main()
{
  clrscr();
  for(unsigned int i=1; i<=10; i++)
    cout<< endl << "2^"<<i<<"="<< power(2, i);
  cout<< endl;
  for(unsigned int i=1; i<=10; i++)
    cout<< endl << "2.5^"<<i<<"="<< power(2.5, i+0.0);

  cout << endl << "Nacisnij klawisz...";
  getch();
  return 0;
}
//---------------------------------------------------------
unsigned int power(unsigned int x, unsigned int y)
{
  unsigned int i, z=1;
  for(i=1; i<=y; i++)
    z = z*x;
  return z;
}
//---------------------------------------------------------
double power(double dx, unsigned long dy)
{
  double z=1.0;
  for(unsigned int i=1; i<=dy; i++)
    z = z*dx;
  return z;
}

