Your task is to write a Rust program that implements the classic programming challenge known as **FizzBuzz**.

You are given a function `fizz_buzz(num: u32) -> String`

that takes a single parameter `num`

of type `u32`

and returns a `String`

.

Your job is to return a string based on the following rules:

- Return "Fizz" for numbers that are multiples of 3.
- Return "Buzz" for numbers that are multiples of 5.
- Return "FizzBuzz" for numbers that are multiples of both 3 and 5.
- Return the number itself for all other numbers.

Here's how the behavior of the function should look like:

Good luck, and happy coding!

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

Loading...