Program which reads two numbers and displays the result of exponentiation of the first number by the second.

class Expo
{ public static void main(String[] a)throws IOException
BufferedReader obj=new BufferedReader(new InputStreamReader(;
int x,y,expo=1;
String num;
System.out.println("Enter the the base and power::");
for(int i=0; i<y;i++)
expo= x*expo;
System.out.println("The Result of exponention= "+expo+".");

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s