An elementary programming challenge is underway on Craig Murphy's blog:

http://www.craigmurphy.com/blog/?p=1417

The task is this: "Write a program which draws a diamond of the form
illustrated below. The letter which is to appear at the widest point
of the figure (E in the example) is to be specified as input data."

There are already a couple of APL entries. My own J entry (which was
not modeled off any other solution) is fairly long:

3 :'(],|....@}:)(|....@}."_1,.])(AB{~i.Y)(_2<\2#i.Y)}''
''$~2#Y=.>:y(=i.1:)AB=.a.{~65+i.26'"0

I intend to also submit a more reader-friendly formatting of this same program.

Tracy
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to