/bhut

Primary LanguagePHP

BHUT Challenge - Backend Developer

Description

Using SOLID principles, write a program that prints all the numbers from 1 to 100. However, for multiples of 3, instead of the number, print "BHUT". For multiples of 5 print "IT". For numbers which are multiples of both 3 and 5, print "BHUT TI".

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

Requirements

  • 1 if
  • You can't use else, else if or ternary
  • Unit tests
  • You can write the challenge in any language you want. Here we are big fans of PHP

Deploy Instructions

After copying the files, run the following command on the terminal to update the dependencies:

composer update

Unit Tests Instructions

To perform unit tests run the following command on the terminal:

vendor/phpunit/phpunit/phpunit

Developed By

Jonathan Lamim Antunes | contato@jonathanlamim.com.br