Question: Write an algorithm in pseudo code for checking whether a number from user input is a prime number. Your algorithm must request user to input
Write an algorithm in pseudo code for checking whether a number from user input is a prime number. Your algorithm must request user to input a positive number, and print "XXX is prime" or "XXX is not prime" in which "XXX" is the number that your algorithm receives from the user Please make sure that your algorithm is written in general term containing algorithm name, pre- condition, post-condition in addition to all the steps; state all your assumptions (2 points) 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
