Prime
Prime
Write a program to take an input number from the user between the range of 1 and
1000 and return true if
the integer is prime number.
Implement the following features
a. The user is only allowed to enter numbers within the range and user can enter 0
to exit the program.
Otherwise it keeps on running.
b. You need to write a function which takes a single integer parameter and returns
a boolean result.
This function evaluates if the argument is a prime between1 and 1000.
c. You will be evaluated for c
ompleteness and validations.
<------------------------------->
package Demo;
import java.util.Scanner;
}
}
/////Main class
package Demo;
import java.util.Scanner;