Skip to content
Quiz · Conditions and Loops · lesson 2 of 6

Quiz — if on a number

What happens when this program is built and run?

Rust
fn main() {
    let n = 1;
    if n {
        println!("yes");
    } else {
        println!("no");
    }
}