I need to figure out some sort of loop to find prime numbers within a restriction of numbers

Write a program that will prompt for 2 numbers and determine all the prime numbers between the 2 numbers:


Example:

Enter the first number: 3
Enter the second number: 17
3 is prime
5 is prime
7 is prime
11 is prime
13 is prime
17 is prime
Include a counter to the program to list exactly how many loops were executed.
At the top of the page there is a light blue box with a light blue button to the right of it that is labeled "Go" and a helpful label to the left of it labeled "Search:". You may find it informative to avail yourself of the functionality provided by the box. Google or other search engines may also be helpful.

If you can't manage that, at least provide the code you've come up with trying to implement a solution to your problem.
Topic archived. No new replies allowed.