fn main() {
    let presents : u8 = 1;

    for i in 0..=9 {
        println!("{}",10-i);
        if i==9 {
            println!("happy diwali!");
            match presents {
                1 => {
            let presentToTheUser = Present::Car;
                    println!("{:?}", "Congratulations! you won a Car");
},
                _ => println!("choose the gift"),
            }
        }
    }
}
enum Present {
    Car,
    Mobile,
    Laptop,
    Bike,   
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: