Tagged Questions
1
vote
3answers
105 views
Project Euler problem 37: truncatable primes
I am working on Project Euler problem 37 and I have the following program:
#!/usr/bin/ruby -w
require 'prime'
h=11
y=0
x=0
while x < 11
if h.prime? == true
boo = true
f=0
...
1
vote
1answer
89 views
Optimizing code for project-euler p#23
I'm working on project euler's problem #23, wich is
Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers
So I came up with this algorithm. Find ...
4
votes
4answers
1k views
Prime number calculator
I am starting to learn Ruby.
This is pretty much the first thing I have coded. It's very simple; it's a prime number calculator. Since this is my first Ruby code, I would like some review on the ...