else statement rust code example
Example: if else Rust
// pratical example of if/else in rust
if n > 1 {
println!("It's greater");
} else if n == 1 {
println!("It's equal");
} else {
println!("It's minor");
}
// pratical example of if/else in rust
if n > 1 {
println!("It's greater");
} else if n == 1 {
println!("It's equal");
} else {
println!("It's minor");
}