From: James Gray Date: 2009-07-25T08:07:09+09:00 Subject: Fwd: quiz LCD numbers --Apple-Mail-3--413424260 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit A solution to a very old Ruby Quiz. Just thought I would share. James Edward Gray II Begin forwarded message: > From: Vento Sola > Date: July 14, 2009 7:03:41 AM CDT > To: submission@rubyquiz.com > Subject: quiz LCD numbers > > Hi. > It's my variant of the quiz "LCD numbers" > With best regards, SolaVento. --Apple-Mail-3--413424260 Content-Type: multipart/mixed; boundary=Apple-Mail-4--413424260 --Apple-Mail-4--413424260 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable A solution to a very old Ruby = Quiz.  Just thought I would share.

James Edward = Gray II

Begin forwarded message:

From: = Vento Sola <solavento@tut.by>
Date: = July 14, 2009 7:03:41 AM CDT
Subject: quiz LCD = numbers
With best regards, = SolaVento.
= --Apple-Mail-4--413424260 Content-Disposition: attachment; filename=quiz2_LCD.rb Content-Type: text/x-ruby-script; x-unix-mode=0666; name="quiz2_LCD.rb" Content-Transfer-Encoding: quoted-printable #guiz 2 LCD number by SolaVento=0D = Digits=3D[3,9,3,0,0,3,2,11,1,0,11,3,1,6,3,1,11,2,3,11,2,0,5,3,3,11,3,1,11,= 3]=0D tmp,output=3D[],[]=0D if $0 =3D=3D __FILE__=0D unless (ARGV.size =3D=3D 1) or (ARGV.size =3D=3D 3 and = ARGV[0]=3D=3D"-s")=0D puts "Usage: #{File.basename($PROGRAM_NAME)} [-s SIZE] NUMBER"=0D= exit=0D end=0D s, number =3D ARGV[0] !=3D "-s" ? [1, ARGV[0]] : [ARGV[1].to_i, = ARGV[2]]=0D number.split(//).each {|x| tmp<<0<4=0D str[1],str[3]=3D[str[1]]*s,[str[3]]*s=0D str.include?(45) ? s.times {output<

--Apple-Mail-4--413424260-- --Apple-Mail-3--413424260--