2017-12-22 15:26:26 +00:00
|
|
|
fn main() {
|
2017-12-22 15:27:43 +00:00
|
|
|
let condition = true;
|
|
|
|
let number = if condition {
|
|
|
|
5
|
2017-12-22 15:26:26 +00:00
|
|
|
} else {
|
2017-12-22 15:27:43 +00:00
|
|
|
6
|
|
|
|
};
|
|
|
|
|
|
|
|
println!("The value of number is: {}", number);
|
2017-12-22 15:26:26 +00:00
|
|
|
}
|