Skip to content

simplonco/ruby-fizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz

  • Fork the GitHub repository.
  • git add, git commit and git push directly on your repository as much you want.
  • Open an Pull request, you must get a green light on the Travis CI server to validate the exercise!

Rules

  • print "fizz" if the integer is a multiple of 3 (and not a multiple of 5)
  • print "buzz" if the integer is a multiple of 5 (and not a multiple of 3)
  • print "fizzbuzz" if the integer is a multiple of 3 and 5
  • print the number if the integer is not a multiple of 3 or 5

Examples

2.fizzbuzz => 2
5.fizzbuzz => "buzz"
6.fizzbuzz => "fizz"
11.fizzbuzz => 11
30.fizzbuzz => "fizzbuzz"

GO, GO, GO!

May the force be with you 👾 !

To go further..

Look at: http://rspec.info/ (T.D.D.)