Answer the next question recorded in the Term 1 journal: how can console input errors be handled without leaving std::cin in a failed state?
Acceptance criteria
- add a small C++17 program that requests an integer in a documented range
- separate validation/calculation logic from console I/O where practical
- cover valid, out-of-range, and non-numeric input
- add automated tests without weakening
-Werror / /W4
- add a journal entry describing the failure-state behavior and evidence
Keep this focused on input state; do not turn it into a large application.
Answer the next question recorded in the Term 1 journal: how can console input errors be handled without leaving
std::cinin a failed state?Acceptance criteria
-Werror//W4Keep this focused on input state; do not turn it into a large application.