Skip to content

reanderson89/fizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

FizzBuzz coding challenge

  • Given an array of integers, swap the values based on the given conditions:
  • "FizzBuzz" if int is divisible by 3 and 5.
  • "Fizz" if int is divisible by 3.
  • "Buzz" if int is divisible by 5.
  • int (as a string) if none of the above conditions are true.
  • Example 1: Input: [1,2,3] Output: ["1","2","Fizz"]

  • Example 2: Input: [1,2,3,4,5] Output: ["1","2","Fizz","4","Buzz"]

  • Example 3: Input: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] Output: ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]

  • You are given a method that that takes a number and returns an array of integers from 1 to the number the passed in.

  • You need to find a way to check each element in the array for the above cases add the needed value to a new String[] for each instance, and then return the String[] with the appropriate values.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages