/foobar

Script outputs numbers from 1 to 100. But replacing certain numbers with foo, bar or foobar depending on conditions.

Primary LanguagePHP

foobar

A PHP script that is executed from the command line. The script should:
• Output the numbers from 1 to 100
• Where the number is divisible by three (3) output the word “foo”
• Where the number is divisible by five (5) output the word “bar”
• Where the number is divisible by three (3) and (5) output the word “foobar”