From: "Luca (Email)" Date: 2011-12-29T15:55:45+09:00 Subject: I: calculating the prime factors of a very large number -----Messaggio originale----- Da: Ja xv [mailto:jeniferjblack@hotmail.com] Inviato: venerd́ 11 novembre 2011 23:47 A: ruby-talk ML Oggetto: calculating the prime factors of a very large number question: How would you write the code to find the prime factors of a very large number? I think one of the factors is small (ie) less than 1000 the code I have written is: print ' please enter num: ' num_one=gets.chomp.to_i data = [] for x in (3..1000) if x%2!=0 then a = (x+1)/2 for i in (2..a) if (x%i!=0)then if i==a then if num_one% x==x then num_one/x=y data <