How zairzrv/rust-scientific-calculator works
A small Rust command-line scientific calculator: it prompts for operands and an operation, parses and validates input, dispatches to arithmetic functions, and prints results or errors in a repeat-until-quit loop. The runtime is implemented in one source file; no separate storage or external integrations are shown.
Main entry points: main.rs REPL loop and banner
Components 5
CLI interaction
- REPL loop and banner
src/main.rs - Prompt and input parsing
src/main.rs
Calculation
- Operation selection
src/main.rs - Arithmetic operations
src/main.rs
Other components
- Calculator user
Connections 5
- Calculator user → REPL loop and banner: starts program
src/main.rs - REPL loop and banner → Prompt and input parsing: runs interaction
src/main.rs - Prompt and input parsing → Operation selection: parses operation
src/main.rs - Operation selection → Arithmetic operations: dispatches calculation
src/main.rs - REPL loop and banner → Calculator user: prints result or error
src/main.rs