Question: Create a system in JAVA that will check if the number is a Prime Number or not. You are also required to draw the flowchart

 Create a system in JAVA that will check if the number is a Prime Number or not. You are also required to draw the flowchart diagram and write the pseudocode for this program. After the user enters a number, it will display the result and will ask the user if he wants to check another number. If the user enters a "Y", he or she can check another number again. If the user enters "N", the program stops and the loop exits. If the user enter other characters when being asked to enter a number the program should stop and print "Input Error". If the user is being asked if he wants to check another number the only accepted input is "Y" and "N", if the user enters other characters while being asked if he wants to check again, the system should print "Input Error" and ask again if the user wants to check again.

 



Code:



Pseudocode:



Flowchart:




Step by Step Solution

3.49 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Naihn Certainly Heres the Java code flowchart and pseudocode for checking prime ... View full answer

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 Programming Questions!