1//from https://doc.rust-lang.org/rust-by-example/flow_control/while.html
2
3fn main() {
4 // A counter variable
5 let mut n = 1;
6 // Loop while `n` is less than 101
7 while n < 101 {
8 if n % 15 == 0 {
9 println!("fizzbuzz");
10 } else if n % 3 == 0 {
11 println!("fizz");
12 } else if n % 5 == 0 {
13 println!("buzz");
14 } else {
15 println!("{}", n);
16 }
17 // Increment counter
18 n += 1;
19 }
20}