0.0
No release in over 3 years
Low commit activity in last 3 years
This gem can generate Ulam spiral and also shows result on console
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 0
 Project Readme

UlamSpiral

This gem can generate Ulam spiral and also shows result on console

Installation

Add this line to your application's Gemfile:

gem 'ulam_spiral'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ulam_spiral

Usage

require "ulam_spiral"

ulam_spiral = UlamSpiral.new(first_number: 3, last_number: 13)
ulam_spiral.generate_spiral
ulam_spiral.show
#=>  7       5
#=>
#=>      3      13
#=>
#=>         11