Diamond

Given a letter print a diamond starting with ‘A’ with the supplied letter at the widest point.

For example: print-diamond ‘E’ prints

    A
   B B
  C   C
 D     D
E       E
 D     D
  C   C
   B B
    A

For example: print-diamond ‘C’ prints

  A
 B B
C   C
 B B
  A

Acknowledgments

This kata is described on cyber-dojo.org

Referenced in these Learning Hours: