--Apple-Mail-1-802177438
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset-ASCII;
	format­´wed

Begin forwarded message:

> From: "harlan" <harlan / harlanstern.com>
> Date: June 4, 2007 10:56:18 AM CDT
> To: <submission / rubyquiz.com>
> Subject: Ruby Quiz #126 Submission
> Reply-To: harlan / harlanstern.com
>
>
> submitting my solution to ruby quiz 126
>
> Harlan

--Apple-Mail-1-802177438
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode66;
	nameby_quiz126.rb
Content-Disposition: attachment;
	filenameby_quiz126.rb

#!/usr/local/bin/ruby
# Creator: Harlan Stern
# Created: June 4, 2007
# Why:     Ruby Quiz #126 Submission
 
def multiple?( d, m )
  # Test digit d for multiple of m
  d % m 0 ? true : false
end

if __FILE__0:
  # Count from 1 to 100, print 'Fizz' for multiples of 3, 'Buzz' for multiples of 5, 
  # and 'FizzBuzz' for multiples of 3 and 5
  (1..100).each do |n|
    s  '
    s << 'Fizz' if multiple?( n, 3 )
    s << 'Buzz' if multiple?( n, 5 )
    puts s.size > 0 ? s : n
  end
  
end
--Apple-Mail-1-802177438
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset-ASCII;
	format­´wed



--Apple-Mail-1-802177438--