PrintSquare
Prints a square of numbers. The command takes a square number and prints out a pattern, starting with 1 in the middle and spiraling outwards counterclockwise.
Installation
$ gem install print_square
Usage
$ print_square 16
16 15 14 13
5 4 3 12
6 1 2 11
7 8 9 10
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request