Exercise#2: Prime Numbers
Write a main() program that:
• Calls the function int validateNumber() which reads, validates that a given number is in the range [100, 100000], and returns the number.
• Calls the function bool isPrime() which checks whether a given number is a prime number of not.
• Calls the function char validateYesNo() which reads, validates that a letter is 'Y', 'y', 'N', or 'n', and returns the letter.
• If the function validateYesNo() returns 'Y' or 'y' the program reads and checks another number.
Sample input/output:
Enter an integer in the range [100, 100000]: 13
Enter an integer in the range [100, 100000]: 534271
Enter an integer in the range [100, 100000]: 2537
2537 is not prime
Do you like to check another integer? Y for yes and N for no: T
Do you like to check another integer? Y for yes and N for no: 5
Do you like to check another integer? Y for yes and N for no: y
Enter an integer in the range [100, 100000]: 1999
1999 is prime.
Do you like to check another integer? Y for yes and N for no: N