Skip to content

carlagouveia/fizzbuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz Variation

Write a program that prints all the numbers from 1 to 100.

Rules

  • For multiples of 3, instead of the number, print "Fizz"
  • For multiples of 5 print "Buzz" .
  • For numbers which are multiples of both 3 and 5, print "FizzBuzz".

But here's the catch: you can use only one if. No multiple branches, ternary operators or else.

Requirements

  • Maximum of 1 if
  • You can't use else, else if or ternary
  • You can't use switch ... case
  • Unit tests
  • You have to use PHP.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages