if else rust

Solutions on MaxInterview for if else rust by the best coders in the world

showing results for - "if else rust"
Tom
18 Jun 2019
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}
Colleen
18 Jan 2020
1if <boolean expression> {
2		print!("result from expression is true");
3	}
4    else {
5        print!("result from expression is false");
6	}