Question: Create a JAVA program that will let the user input a number and output the following using its coressponding methods: isPrime() - returns true if
Create a JAVA program that will let the user input a number and output the following using its coressponding methods:
isPrime() - returns true if the number is a prime number , otherwise it will return false. isEven() - return true if the number is an even number , otherwise it returns= false. isPerfectNumber() - returns true if the number is a perfect number , otherwise false. isLeapYear() - return true if the number is a leap year, otherwise return false.
Input Number : 45 45 is not PRIME 45 is not EVEN 45 is a perfect number 45 is not a perfect square 45 is not a leap year
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
