Question: Write a program that reads two positive numbers as input and determines all the prime numbers (Links to an external site.) between the two given
Write a program that reads two positive numbers as input and determines all the prime numbers (Links to an external site.) between the two given input values (inclusive of the two input values as well). Assume that only numbers are entered as input. If a negative number is entered, the program must halt with an appropriate message. If there are no prime numbers present in the given range, the program should display the appropriate message.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
