📅  最后修改于: 2023-12-03 15:04:57.571000             🧑  作者: Mango
Rust BMI is a simple command-line tool for calculating a person's Body Mass Index (BMI) using the Rust programming language.
First, make sure you have Rust installed on your machine. You can download Rust here.
Next, clone the Rust BMI repository:
git clone https://github.com/your_username/rust-bmi.git
Then, navigate to the rust-bmi
directory and build the project:
cd rust-bmi
cargo build --release
This will create an executable file in the target/release
directory called rust_bmi
.
To use Rust BMI, simply run the rust_bmi
executable and provide your weight in kilograms and height in meters as arguments:
./target/release/rust_bmi 70 1.75
This will output your BMI:
Your BMI is: 22.86
If you would like to contribute to Rust BMI, please see our contribution guidelines for more information.
Rust BMI is released under the MIT License.