Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Count to Five

Use a while loop to print the numbers 1 through 5, one per line.

Expected output:

text
1
2
3
4
5

Hints:

  • Start with let mut count = 1;
  • Loop while count <= 5
  • Don't forget to increase count by 1 each time!
rust
fn main() {
}