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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!