Recruiter test: create script to generate times table on first 10 prime numbers
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.rvmrc
README.md
prime_number.rb
prime_number_spec.rb
run.rb

README.md

Times table of prime numbers

Recruiter task:

Create small program that will output a times table of the first 10 prime numbers (1, 3, 5, 7, 11, 13, 17, 19, 23, 29)

  • task should be finished in 1 h
  • task was finished in 2h
  • reason: "I wanted to do it properly with class & RSpec and own prime number generator"

To test this in irb:

require './prime_number'
prime_numbers = PrimeNumber.new(10)
prime_numbers.print_times_table

or is bash just run

ruby run.rb