- if
- else
Conditional: if - else
examples/booleans/if-else/src/main.rs
fn main() { let x = 23; let y = 32; if x > y { println!("x is bigger than y"); } else { println!("x is smaller than y or equal to it"); } }
x is smaller than y or equal to it
fn main() { let x = 23; let y = 32; if x > y { println!("x is bigger than y"); } else { println!("x is smaller than y or equal to it"); } }
x is smaller than y or equal to it