Answers for "how to check the number is power of 10 in java"

0

Java program to find the power of a number

@Test
	public void powerOfTheNumberProgram13() {
		Scanner scanner = new Scanner(System.in);
		System.out.println("Enter any NUMBER: ");
		int number = scanner.nextInt();
		System.out.println("Enter the POWER: ");
		int power = scanner.nextInt();
		scanner.close();
		// Logic for finding the POWER of number
		int powerOfNumber = (int) Math.pow(number, power);
		System.out.println("Power of a " + number + "^" + power + ": " + powerOfNumber);
	}
Posted by: Guest on November-11-2020

Code answers related to "how to check the number is power of 10 in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language