Skip to content

Instantly share code, notes, and snippets.

View murphjm's full-sized avatar

Justin Murphy murphjm

  • San Francisco, CA
View GitHub Profile
#!/usr/bin/ruby
red = [4,4,4,4,4,9]
blue = [2,2,2,7,7,7]
olive = [0,5,5,5,5,5]
yellow = [3,3,3,3,8,8]
magenta = [1,1,6,6,6,6]
def compete(x, y, n)
x_wins = y_wins = 0
#!/usr/bin/ruby -w
if ARGV.length == 0
puts "Usage: Enter the number of prime numbers to generate."
exit 0
end
ceiling = ARGV[0].to_i
# Populate an array called primes with all integers from 2 to ceiling.