Jonathan E. Landrum a1168b9dfd Updated README | пре 9 година | |
---|---|---|
.. | ||
README.md | пре 9 година | |
char-diamond-results.png | пре 10 година | |
char-diamond.cpp | пре 10 година | |
diamond.jpg | пре 10 година | |
hollow-diamond.cpp | пре 10 година | |
solid-diamond.cpp | пре 10 година |
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.