Question: Write a class named problem 2 . In main method of this class, ask the user for an integer and determine whether this integer is
Write a class named problem In main method of this class, ask the user for an integer and determine whether this integer is a prime number or not. Display true if it is prime, false otherwise.
A prime number is a number greater than with only two factors themselves and A prime number cannot be divided by any other numbers without leaving a remainder.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
