public class TestExponent3
{
   public static void main (String [] args)
	{
	     System.out.println (exponent3(3,4));
  	}// end main

   public static int exponent3 (int x,int  y)
	{ 
	  int temp = 0;
	  if (y == 0)
	     temp = 1;
	  if (y == 1)
	     temp = x;
	  if (y > 1)
	  {
	     temp = 1;
		  int count;
		  count = 1;
		  if (count <= y)
		  {
		    temp = x * temp;
			 count ++;
		  }
	 }
	 return temp;
	} // end method
}// end class
