Working not in that way that we want


In last line I write following
puts first_n_primes(-1)


puts first_n_primes(1.5)

with this parametr I get the answer
puts first_n_primes(a) and puts first_n_primes(‘a’ )
I receive no answer only infinite loop
this means that n.is_a? Integer
working not in that way that we want
I puts in lines 9, 10

prime_array ||= []
puts prime_array
puts first_n_primes(1)

in last line I get [] in the screen and infinite loop later So - infinite loop - somewhere here
prime =
for num in (1…n)
return prime_array


I think module ‘prime’ and ‘mathn’ doesn’t connect with this project. So program for infinity looking for this labrary


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.