Objectives
- Create user-defined functions
- Use user-defined functions
- Validate user input
- Create function prototypes
- Implement pseudocode
This assignment gets a start value and an end value from the user. Both values must be validated as integers within specified ranges. The program then displays a list of all the prime numbers between those two values.
Enter starting integer (1 - 100): SpongeBob SquarePants Error: Invalid integer Enter starting integer (1 - 100): -4 Error: Value below minimum of 1 Enter starting integer (1 - 100): 700 Error: Value above maximum of 100 Enter starting integer (1 - 100): 1 Enter ending integer (2 - 1000): 1 Error: Value below minimum of 2 Enter ending integer (2 - 1000): Patrick Star Error: Invalid integer Enter ending integer (2 - 1000): 123 Primes between 1 and 123 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113