To divide two numbers in Rust, you can use the '/' operator.
In this example,
numerator
and denominator
and assign values to them./
operator and print the result.fn main() {
let numerator = 20;
let denominator = 5;
let quotient = numerator as f64 / denominator as f64;
println!("Division of {} by {} is: {}", numerator, denominator, quotient);
}
Division of 20 by 5 is: 4
In this tutorial, we learned How to find the Division of Two Numbers in Rust language with well detailed examples.