Create a program that will calculate the power value.It will ask the user to enter the base value and index value.On the basic of the entered input,the program will find the power value and display the output.

public class Power
    public static void main(String args[])throws IOException
	   float base;
	   float index;
	   double power;
	   InputStreamReader obj=new InputStreamReader(;
	   BufferedReader objectBR=new BufferedReader(obj);
	   System.out.printIn("Enter the Base value");
	   String b=objectBR.readLine();
	   System.out.printIn("Enter the Index value");
	   String i=objectBR.readLine();
	   System.out.printIn("Base is :"+base);
	   System.out.printIn("Index is :"index);
	   System.out.printIn("Power value is :"+power);

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Show Buttons
Hide Buttons