Jonathan E. Landrum a1168b9dfd Updated README | 9 vuotta sitten | |
---|---|---|
.. | ||
README.md | 9 vuotta sitten | |
char-diamond-results.png | 10 vuotta sitten | |
char-diamond.cpp | 10 vuotta sitten | |
diamond.jpg | 10 vuotta sitten | |
hollow-diamond.cpp | 10 vuotta sitten | |
solid-diamond.cpp | 10 vuotta sitten |
This is a collection of programs that explore the time-honored tradition of requiring freshmen computer science students to write a program that prints a diamond to the terminal.
Included in this collection is the typical filled diamond of asterisks:
*
***
*****
***
*
*
* *
* *
* *
*
And a neat character diamond implementation:
A
B B
C C
B B
A
I stumbled upon the character diamond challenge one day while searching for programming assignments, and found this image:
This was a programming assignment from the late '80's that was intended to be programmed in Pascal. It was posted online in early 2009, well before all the chic "hacker" websites existed that have weekly challenges nowadays. It's much easier with these sites to find things to do when you're bored. Before that, though, you had to dig. I'm glad I went digging.