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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request