📄 ex06.rs
/home/palash/git/misc/rust/rust101/src/bin/ex06.rs
Language: rs • Lines: 11
// Topic: Count down 5 to 1 with loops and without using break.

fn main() {
    let mut counter = 5;

    while counter > 0 {
        println!("{counter}");
        counter = counter - 1;
    }
    println!("Done!");
}