Question: Write a program that ask the user to input a positive number and count the prime numbers before reaching (Exclusive, [1, [) to the user
Write a program that ask the user to input a positive number and count the prime numbers before reaching (Exclusive, [1, [) to the user input. Keep doing that until receive an input 0 from the user.
User input validation
Negative number: you need to ask the user to enter the value again (As shown in the sample output)
0: stop
Remember to reset some values to their original value (e.g., count =0) when suitable.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
