power of a number in java

Solutions on MaxInterview for power of a number in java by the best coders in the world

showing results for - "power of a number in java"
Luis
17 May 2016
1int powerOfNumber = (int) Math.pow(number, power);
Morgan
16 Nov 2018
1int n=Math.pow(N, P); 
Ilaria
09 Oct 2017
1@Test
2	public void powerOfTheNumberProgram13() {
3		Scanner scanner = new Scanner(System.in);
4		System.out.println("Enter any NUMBER: ");
5		int number = scanner.nextInt();
6		System.out.println("Enter the POWER: ");
7		int power = scanner.nextInt();
8		scanner.close();
9		// Logic for finding the POWER of number
10		int powerOfNumber = (int) Math.pow(number, power);
11		System.out.println("Power of a " + number + "^" + power + ": " + powerOfNumber);
12	}
Pedro
15 Mar 2020
1int base=2, power=5, result=1;
2while(power != 0) {
3	result = result * base;
4	power--;
5}
Emely
20 Jun 2016
1int base=2, power=5, result=1;
2for(int i = 1; i <= power; i++) {
3	result = result * base;
4}
queries leading to this page
java program to print first 10 power of 2how to find power in javafind out the power of a number using your own logic and using math class functionjava how to power numberfor taking power in java of any integeraccept two numbers and then calculate power of first number with respect to the second number javasum of n numbers in java in math powhow to get power of a number in javahow to calculate the power of a number javapower on javahow to power a number in javaprinting int as power in javanumber power in javahow to get a numbher to the power of javapower of a integer in javacalculating power of a number without using function in javacalculate power javapower function in java for integer numbersjava power number codecalculate pow in java methodcalculate power of a number in javahow to find n to the power of p in javajava how to display a powerprinting power of 10 in javaget power value of integer javawap to calculate power of an integer in javahow to have power in javapower number in programing how write in javafunction to find power of a number in javahow to take power of a number in javahow to get powers in java2 to power 3 in javahow to put a number to a power in javapower calculation in javaevaluate a pow b in java without builtin methodfind power in javapower calculation javahow to find power of number in javaefficient way of finding power of a number in javahow to use power of a numbert in javafind power of number in javafinding power in javajava power of numberjava program to get power of a numbercalculating the power in javafind power of number java program power of 10 in javaprint powers of 2 uptil 2 5en javahow to power the numbers in java without any funevaluate a pow b in javajava 10 to the power ofto the power of in javapower of a base with its exponent javaprogram to calculate power of number in javafinding power of number java programvalue power calculate in javajava program to calculate power of a given numberhow to take power of number in javahow to check the number is power of 10 in javahow to code the pow function in javacalculate the power in javahow to find powers in javahow to get a number to power injavax power n in javahow to get power of number in javahow to compute power in javahow to get integer power in javapower of integer in javacalculating powers rin javax power of y in javahow to find power of a number in javapower numbers in javapower to the two in javam raise to n in javahow to write a number raised to a power in javacalculate the power of a given number in javahow to found power of any number in javapower of number program in javajava 4th powerjava program to calculate power of a numbernumber to a power of 10 javachecking if a number is a power of 3 javahow to write power of a number in java without mathhow to calu 3dlculate power in javapower of a number in java using math powhow to get power of value in javahwo to find power in javapower of any number in javatake the power of an integer in javajava power of a numberfind power of 2 in javahow to use a power in java of numberjava number powerprogram to print the power of m raised to n in java with system input valuefor statement java for powers of a numberfind power of a number in javajava program to print first 10 powers of 2 for loophow to estimate the numbwr in javahow to get power of any numberc javahow to find power without using pow function in javaprogram to find power of a number in java1 to the first power in javajava n power pinbuilt function in java to find power of a numberjava put a number to a power of xjava calculate powerprogram to print the power of m raised to n in javahow to calculate power javaprogramme to find pow of a number javajava find power of numberpower in javahow to get the power of a number in javamath power java with intwhat is 2 raised to power of 4 in javaprinting power in javahow to do power calculation in java for integers4 power of 2 javawrite a java program to compute the value of m 5en using method power of 2 in javahow to see power of a number in javafind power of 2 java program without using pow functionhow to power in java of numbersimple power function javawrite a program to find power of a given number in javajava program to find the power of a numberx to the power of 3 2aa in javapower of a number program javajava program to find power of a numberjava code to find power of a numberhow to print power of 10 in javanumber power in javaacompute a power b in javacompute power in javawhat is an efficient way to do power of a number javacalculating powers in javapower progress program in javapower of number program in java using whilehow to find power of any number in javahow to find the no is power of 2 code in java2 power in javamath power of number in javajava std powejava power ofjava power of a number algorithmlogic of power expression in javajava power numberhow to find the power of a number in javajava number to the power ofpower of number in javajava program for power of a numberpower of a number in javapower of n in javapow of a number in javaa power b javagetting the power of a number in javawrite a program to find the value of one number raised to the power of another in javacalculate n to power of 10 with javawrite a java program to find power of any number x 5e y java power of integercalculate pow in javajava program which calculates exponenthow to find power of a number in java without math powpower of a number javapower of number javahow to calculate power i javahow to do powers in javatake power of int in javajava program raised to the powerhow to write power of a number in javajava power whilecalculate 2 power n without inbuild function javahow to take out power of num in javaprogram to calculate power of number in java without input in programhow to find an power sequence in jvacheck if number is power of 10 javanumber power without math function in javahow to calculate power of a number in javacalculate x power nwithout using math powjava how to do power of 3how to use power of a number in javapwer in javajava is power ofpowers in javafind power of number java program without using pow functionjava how to find power of a number without using pow functionpower to the in java2 power 5 in javahow to power a number in java in javahow to get power of a number using import java lang mathhow to tke powe of float numbers for javato the power of javahow to find exponent of a number in javafinding power of number in javajava calculate power of a numberhow to take power in javacalculating power in javacalculating 2 5en in javan to the power n in javajava calculate power of 2get power of numbers in javahow to calculate power in javahow to give power to a number in javapower in java using multiplicationcode to find power using loops in javahow to find exponent in javax to the power y in javajava power of 10get power of numbers in java using whilejava get power of a numbercalculate power in javapower function java without inbuilt functionprogram to print the power of m raised to n2 to the power of 3 in javacheck if number is power of 4 javapower progress program in java user inputcalculating power of a number without using power function in javapower progression question javahow to find power of a number without using pow function java how to power the numbers in javafind power of 2 java programpower of a number in java