// Marcus Whybrow
#define WORD_SIZE 32

int main() {
		

	/* Declare Local Variables */
	int x;		// base number
	int y;		// exponent number
	int z = 1;	// answer
	int i;		// for loop control variable

	/* input */
	printf("\nEvaluates x^y where x is the base and y is the exponent:\nx = ");
	scanf("%d",&x);
	
	printf("y = ");
	scanf("%d",&y);

	/* Calc */
	for(i = 0; i < WORD_SIZE; i++, x*=x, y >>= 1) {
		if(y == 0) { break; }
		if(y&1) { z *= x; }
	}

	/* Output */
	printf("x^y = %d\n",z);
}