#C4744. Reminder Email Generator
Reminder Email Generator
Reminder Email Generator
You are tasked with writing a program that generates a reminder email text based on the number of books checked out by a user. The program should read a single integer from the standard input, which represents the number of books. Depending on the value, the program prints a specific message. Please note the following conditions:
- If the number is 0, output:
You have no books checked out. Check out our new arrivals!
- If the number is 1 or 2, output:
Don't forget to return your books on time!
- If the number is 3 or more, output:
You have checked out a lot of books. Consider returning some.
- If the number is less than 0 or greater than 100, the program must throw an error with the message:
The number of books must be between 0 and 100 inclusive.
Note: When a value is invalid (i.e. not in the range [0, 100]), your program should output the error message.
The solution must use standard input (stdin) to receive the input and standard output (stdout) for the output. Any mathematical formulas used in the description should be written in LaTeX format.
inputFormat
The input consists of a single integer N read from standard input. This number indicates the number of books checked out. The integer N satisfies \( -\infty < N < \infty \).
outputFormat
Output a single line string based on the following conditions:
- If \(N = 0\): "You have no books checked out. Check out our new arrivals!"
- If \(N = 1\) or \(N = 2\): "Don't forget to return your books on time!"
- If \(N \geq 3\): "You have checked out a lot of books. Consider returning some."
- If \(N 100\): Output the error message "The number of books must be between 0 and 100 inclusive."
0
You have no books checked out. Check out our new arrivals!
</p>