1// pratical example of if/else in rust
2if n > 1 {
3 println!("It's greater");
4} else if n == 1 {
5 println!("It's equal");
6} else {
7 println!("It's minor");
8}
1if <boolean expression> {
2 print!("result from expression is true");
3 }
4 else {
5 print!("result from expression is false");
6 }