import java.util.Scanner;

/**
 * Performs integer exponentiation with a user-specified base and exponent. 
 *
 * @author Drue Coles
 */
public class PowerCalculator {

    public static void main(String[] args) {       
        
        // Prompt the user and read input.
        System.out.print("Enter two integers (base and exponent): ");
        Scanner in = new Scanner(System.in);
        int base = in.nextInt();
        int exponent = in.nextInt();

        int result = (int) Math.pow(base, exponent);

        // Format and display result as an equation.
        String output = base + "^" + exponent + " = " + result;
        System.out.println(output);
    }
}