📜  rust BMI - Rust (1)

📅  最后修改于: 2023-12-03 15:04:57.571000             🧑  作者: Mango

Rust BMI - Rust

Rust BMI is a simple command-line tool for calculating a person's Body Mass Index (BMI) using the Rust programming language.

Installation

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.

Usage

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
Contributing

If you would like to contribute to Rust BMI, please see our contribution guidelines for more information.

License

Rust BMI is released under the MIT License.