// Recurson of pow function with out using a built in function.
// Date 00:20 26/10/2016
// By Ben a.k.a DreamVB

#include <iostream>
using namespace std;
using std::cout;
using std::endl;

int PowerOf(int x, int y){
	//Recurson of pow function
	if (y <= 0){
		//Quit if hit zero
		return 1; 
	}
	//Call back function
	return x*PowerOf(x, y - 1);
}

int main(int argc, char *argv[]){
	cout << "2 pow 8 is : " << PowerOf(2, 8) << endl;
	system("pause");
	return 0;
}