// Demonstrates method overloading usage 	
	
import java.util.*;	
	
public class PowerDemo {	
	
	// main(): application entry point	
	public static void main(String[] args) {	
		Scanner stdin = new Scanner(System.in);	
	
		System.out.print("Enter an integer base: ");	
		int i1 = stdin.nextInt();	
		System.out.print("Enter a positive integer power: ");	
		int i2 = stdin.nextInt();	
		int ipow = Tools.power(i1, i2);	
		System.out.println(i1 + " to the power "+ i2 + " is " 	
			+ ipow);	
	
		System.out.print("Enter a floating-point base: ");	
		double d = stdin.nextDouble();	
		System.out.print("Enter a positive integer power: ");	
		int n = stdin.nextInt();	
		double dpow = Tools.power(d, n);	
		System.out.println(d + " to the power "+ n + " is " + dpow);	
	}	
}	
