From: David Alan Black Date: 2001-07-20T00:19:06+09:00 Subject: [ruby-talk:18126] Re: An exercise in minimalism Hi -- On Thu, 19 Jul 2001, Chris Moline wrote: > Here's a first attempt. It weighs in at 66 bytes. > > (n=$*[0].to_i).times{|i|s=((n-1)/2-i).abs > puts " "*s+"#"*(n-2*s)} ^ You can take out that space, in which case I declare a tie :-) Here's my 65-byte version: n=$*[0].to_f/2 (0-n..n).each{|x|puts" "*x.abs+"#"*(2*(n-x.abs))} But I have to thank you for $* -- I'd been using ARGV. My solution is pretty close to a transliteration of my Perl solution, which was: $n=.5*pop;print$"x abs,"#"x(2*($n-abs)),$/for(-$n..$n) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav