Gracze liczą po kolei: 1, 2... Ale gdy liczba jest podzielna przez 3, zamiast tej liczby należy powiedzieć "Fizz". Natomiast gdy liczba jest podzielna przez 5 trzeba powiedzieć "Buzz". Gdy liczba jest podzielna zarówno przez 3 jak i przez 5, trzeba powiedzieć "FizzBuzz".
- Utwórz funkcję, która przyjmuje liczbę naturalną większą od 0 i zwraca dla niej reprezentację, będący odpowiedzią w grze Fizz Buzz.
- Utwórz program, który wypisuje na konsolę odpowiedzi dla liczb od 1 do 100 oddzielone przecinkami.
- Fizz odpowiadamy również wtedy, gdy liczba zawiera cyfrę 3.
- Podobnie dla Buzz - także gdy liczba zawiera cyfrę 5.
- Od teraz Fizz i Buzz mówimy dla podzielności przez/zawierania cyfr 7 i 9.
For multiples of 3 return "Fizz" instead of the number For the multiples of 5 return "Buzz" instead of the number For numbers which are multiples of both 3 and 5 return "FizzBuzz" instead of the number
- Write a function that takes one number (larger than 0) and return its representation in FizzBuzz game
- Write a program that prints on console answers for numbers from 1 to 100, comma separated
- "Fizz" returned also when number contains digit 3
- "Buzz" returned also when number contains digit 5.
- "Fizz" and "Buzz" when number is multiple or contains digit: 7 i 9.