document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. require \'prime\'
  2. primes = Array.new
  3. counter = ARGV[0].to_i
  4. counter = 30 if counter == 0
  5. (2..counter).to_a.each { |x|
  6.   if Prime.prime? x then
  7.     primes << x
  8.   end
  9. }
  10.  
  11. x = primes
  12. y = primes
  13.  
  14. print \'     \'
  15. x.each {|i| print "%-3d  " % i}
  16. print "\\n     "
  17. x.each {|i| print \'---- \'}
  18. print "\\n"
  19.  
  20. y.each do |j|
  21.    print "%-3d| " % j
  22.    x.each {|i| print "%-3d  " % (i*j)}
  23.    print "\\n"
  24. end
');