An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# FooBar [![Travis](https://api.travis-ci.org/ljmf00/FooBar.svg?branch=master)](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