fn main() {
    let number = 7;
    let mut condition = false;

    if number < 5 
    {
        println!("condition was true");
        condition = true;
    } 
    else 
    {
        println!("condition was false");
        condition = false;
    }

    let number = if condition { 5 } else { 6 };

    println!("The value of number is: {number}");



    let mut count = 0;
    'counting_up: loop 
    {
        println!("count = {count}");
        let mut remaining = 10;

        loop
        {
            println!("remaining = {remaining}");
            
            if remaining == 9
            {
                break;
            }
            
            if count == 2 
            {
                break 'counting_up;
            }
            
            remaining -= 1;
        }
            count += 1;
    }
    println!("End count = {count}");

    for number in (1..4).rev() {
        println!("{number}!");
    }

    let a = [10, 20, 30, 40, 50];

    for element in a {
        println!("the value is: {element}");
    }
}

