Prime in Ruby – alternative solution
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

Prime in Ruby – alternative solution

Posted in Ruby

As I showed in my article here, we can have another way of doing this job: 1234567require ‘prime’ goal = 600851475143 Prime.each(goal) do |number|    @container = [number] end puts @container.last This small piece of code illustrates togeter with my other solutions, that we have a vast amount of ways doing things in Ruby …

Tags: , , ,

prime numbers with ruby

Posted in coffee break, Ruby

In the last two weeks I was reading a lot about prime numbers. As a child I started to love these special numbers. The Definition of a Prime number is, that it is a natural number greater than 1 that has no positive divisors other than 1 and itself. There are different methods and ways […]

Tags: , , , , , ,

Copyright © 2011-2017  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy