So I have been given a problem in class stating that I had to calculate the sexy prime pairs. I have to use the sieve of eratosthenes alogorithm and a array to calculate the prime numbers and then use that same array to display the sexy prime pairs in between boundaries that are specified by the user. Much help will be appreciated thanks.

This is the sample run.

Please enter a lower boundary and an upper boundary and I will print all of the

sexy prime pairs between those boundaries.

Please enter the lower boundary (between 1 and 50000): 0

Please enter the lower boundary (between 1 and 50000): 50001

Please enter the lower boundary (between 1 and 50000): 150

Please enter the upper boundary (between 1 and 50000): 0

Please enter the upper boundary (between 1 and 50000): 50001

Please enter the upper boundary (between 1 and 50000): 100

Your upper boundary cannot be smaller than your lower boundary

Please enter the lower boundary (between 1 and 50000): 8997

Please enter the upper boundary (between 1 and 50000): 9200

Here are all of the sexy prime pairs in the range 8997 to 9200, one pair per line:

9001 and 9007

9007 and 9013

9043 and 9049

9103 and 9109

9127 and 9133

9151 and 9157

9181 and 9187

There were 7 sexy prime pairs displayed between 8997 and 9200.