What this Rust input-handling question tests
This is an easy question that probes basic familiarity with how Rust programs read and process user input. It asks you to trace through a small code snippet and reason about what happens when a specific value is provided at runtime.
To solve it, you'll need to understand how Rust's standard library handles input parsing, type conversion, and arithmetic operations. The question rewards careful reading of the code flow and attention to how values are transformed as they move through the program.
- Input buffering and the
stdin module - String parsing and type conversion
- Arithmetic and output formatting