#!/root/clam/clam
#include "stdlib.h"

main()
{
  float v;
  int i, j;

  for(j=2;j<33;j=j+1) {
    for(i=0;i<33;i=i+1) {
      printf("%2d^%-2d = %.0f\n",j,i,ipow(j,i));
    }
  }
}

ipow(float x, int y)
{
  float v;
  v = 1.0;

  if (x == 0) return 0;
  while (y) {
    if (y & 1) v = v * x;
    x = x * x;
    y = y >> 1;
  }
  return v;
}
