ljmf00 / FooBar

Random code example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FooBar Travis

Random code example

Statement

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Foo" instead of the number and for the multiples of five print "Bar". For numbers which are multiples of both three and five print "FooBar".

Output example

> FooBar
Output: 1 2 Foo 4 Bar Foo 7 8 Foo Bar 11 Foo 13 14 FooBar 16 17 Foo ……

How to build

  1. Install dub and the compiler.
  2. Do dub run.
  3. See the magic!

or just use online editor.

LICENSE

MIT License

About

Random code example

License:MIT License


Languages

Language:D 100.0%