import java.util.Scanner;
public class PowerCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(
System.in );
System.out.print("Enter a number: ");
int number = scanner.nextInt();
System.out.print("Enter a power: ");
int power = scanner.nextInt();
int result = calculatePower(number, power);
System.out.println("Result: " + result);
}
public static int calculatePower(int number, int power) {
int result = number;
for (int i = 1; i < power; i++) {
result *= number;
}
return result;
}
}