A simple command-line BMI (Body Mass Index) calculator written in Rust.
Users can input their weight and height, and the program outputs their BMI along with the corresponding category.
- Parses weight and height input from the user
- Calculates BMI and rounds it to 2 decimal places
- Outputs BMI category (e.g., Normal, Overweight, Obese Class I)
- Validates realistic weight and height ranges
- Modular Rust code with functions for parsing, calculation, and categorization
-
Clone the repository:
git clone https://github.com/Tirthagit/rust-bmi-calculator-program.git
-
Change directory to project directory
cd bmi-calculator
-
Run using Cargo
cargo run
## Example
Enter your weight in kilograms: 70
Enter your height in meters: 1.75
Your B.M.I is: 22.86 --> Normal
- Add command-line arguments for weight and height
- Implement error handling without panics
- Add history tracking or logging of previous BMI calculations