Sha256: 9fa0ccf1805681e9e929f5445018424328c322e090aa3b7acc24bd201083c55c

Contents?: true

Size: 231 Bytes

Versions: 9

Compression:

Stored size: 231 Bytes

Contents

def make_random_array(length, maxnum)
	result = Array.new(length)
	result.each_index do |i|
		result[i] = rand(maxnum)
	end
		
	result
end
 
def is_prime(x)
	y = 2
	y.upto(x-1) do |i|
		return false if (x % i) == 0
	end
	true
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
jeremy-ruby-prof-0.6.1 test/prime3.rb
ruby-prof-0.5.2-mswin32 test/prime3.rb
ruby-prof-0.5.1-mswin32 test/prime3.rb
ruby-prof-0.5.0-mswin32 test/prime3.rb
ruby-prof-0.5.2 test/prime3.rb
ruby-prof-0.5.1 test/prime3.rb
ruby-prof-0.5.0 test/prime3.rb
ruby-prof-0.6.0 test/prime3.rb
ruby-prof-0.6.0-x86-mswin32-60 test/prime3.rb