In this challenge, you will implement a simple countdown timer using a **while loop**. The goal is to create a function that takes an integer `n`

and returns a vector containing the countdown from `n`

to 0.

Write a function `countdown(n: u32) -> Vec<u32>`

that takes a non-negative integer `n`

and returns a vector with the numbers from `n`

to 0.

- Use a
`while`

loop to implement the countdown. - Ensure the function handles the case where
`n`

is 0 correctly. - The function should return a vector with each number in the countdown sequence.

In order to solve the challenge, please visit this page on a desktop computer.

Loading...