Someone
public ruby v1 · immutablex=ARGV[0].to_idef f(n);(n/2).downto(2){|i| yield i if n%i<1};endf(x){|i| begin; f(i){raise}; rescue; next; end puts "#{i} is the largest prime factor of #{x}" exit}x=ARGV[0].to_idef f(n);(n/2).downto(2){|i| yield i if n%i<1};endf(x){|i| begin; f(i){raise}; rescue; next; end puts "#{i} is the largest prime factor of #{x}" exit}