You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
319 B
17 lines
319 B
3 years ago
|
static LANGUAGE: &str = "Rust";
|
||
|
const THRESHOLD: i32 = 10;
|
||
|
|
||
|
fn is_big(n: i32) -> bool {
|
||
|
n > THRESHOLD
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let n = 16;
|
||
|
|
||
|
println!("This is {}", LANGUAGE);
|
||
|
println!("The threshold is {}", THRESHOLD);
|
||
|
println!("{} is {}", n, if is_big(n) { "big" } else { "small" });
|
||
|
|
||
|
// THRESHOLD = 5;
|
||
|
}
|