mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-16 16:31:56 +00:00
9 lines
475 B
Markdown
9 lines
475 B
Markdown
# Fizz buzz
|
|
Fizz buzz is often used as an interview problem to test if an applicant has basic programming knowledge. For a give `n`, the program should print the number between `1` and `n`. If the i-th number is divisible by three, it is replaced by `fizz`. If the number is divisible by five, it should print `buzz`. If the number is divisible by both, it should print `fizz buzz`.
|
|
|
|
In Javascript, you can implement it as follows:
|
|
```javascript
|
|
function fizzBuzz(n) {
|
|
|
|
}
|
|
``` |