rustlings/exercises/primitive_types/primitive_types1.rs

18 lines
434 B
Rust
Raw Normal View History

2018-02-22 00:09:53 -06:00
// primitive_types1.rs
2015-09-18 20:10:16 -05:00
// Fill in the rest of the line that has code missing!
// No hints, there's no tricks, just get used to typing these :)
fn main() {
// Booleans (`bool`)
let is_morning = true;
if is_morning {
println!("Good morning!");
}
2023-02-16 11:31:18 -06:00
let is_evening = false; // Finish the rest of this line like the example! Or make it be false!
2015-09-18 20:10:16 -05:00
if is_evening {
println!("Good evening!");
}
}