
#include <iostream>
#include <math.h>

float Power(float a, unsigned int b);  // compute a to the power of b

int main()
{
  float a, c;
  int b;

  std::cout << "Input a float, a, and nonnegative integer, b: ";
  std::cin >> a >> b;
  std::cout <<  "You entered: a=" << a << " and b=" << b << std::endl;

  c = Power(a,b);

  std::cout << a << " to the power of "<< b << " is " << c << std::endl;
  return(0);
}

float Power(float a, unsigned int b)
{
  if (b==0)
    return(1);
  else
    return( a*Power(a, b-1));
}
