Question: Create a program that will take as input a positive integer value greater than zero (0), and then determine if it is a prime number.
Create a program that will take as input a positive integer value greater than zero (0), and then determine if it is a prime number. The program will continue to take input & display results until the user chooses to Q (quit).
Note: Make sure your prompts & displayed outcomes will be to the screen and should be user friendly. Input is from the keyboard.
Assignment Specifications:
Code the problem in Java using two different looping syntax (i.e. for, while, or do-while).
Run for input: 2 , 4, 7, 9, 11, 13, 50, 562, 31, 16, 34, 29, 79, 17, 169
Step by Step Solution
There are 3 Steps involved in it
Certainly Lets create a Java program that takes positive intege... View full answer
Get step-by-step solutions from verified subject matter experts
