https://github.com/ljmf00/foobar
Random code example
https://github.com/ljmf00/foobar
bar example foo foobar random
Last synced: about 2 months ago
JSON representation
Random code example
- Host: GitHub
- URL: https://github.com/ljmf00/foobar
- Owner: ljmf00
- License: mit
- Created: 2019-06-06T14:13:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T16:41:35.000Z (almost 6 years ago)
- Last Synced: 2025-02-08T15:47:09.187Z (4 months ago)
- Topics: bar, example, foo, foobar, random
- Language: D
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# FooBar [](https://travis-ci.org/ljmf00/FooBar)
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
```text
> 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](https://code.dlang.org/download) and the [compiler](https://dlang.org/download.html).
2. Do `dub run`.
3. See the magic!or just use [online editor](https://run.dlang.io/).
## LICENSE
MIT License