Write a program to find the 4th power of a given number in java

Write a program to find the 4th power of a given number in java

public class FourthPower
{
    public static void main(String args[]){
        
        int number = 25;
        int fourPower=number*number*number*number;
        System.out.println("4th power of "+number+" is "+fourPower);
    
    }
}


Output 

4th power of 25 is 390625

Comments

Popular posts from this blog

How to make simple bill maker by using python tkinter

Write a program to find sum of first 10 natural number in java

Calculate Compound Interest in JavaScript