Just for 'fun,' I included code snippets in various languages to solve the last problem, in which you needed to sum the harmonic series over 75 terms. Actually, I wrote quick versions in several languages, such was the depth of my procrastination. Represented are
- C (iterative and recursive solutions)
- Pascal
- Perl
- LISP
- Python
- Java
- shell (bash) script
- Postscript
- Fortran
(In particular, my postscript solution could be fancied up quite a bit for prettier output. The bash script is also a bit cheap and approximate, since one can only use integers.)
Seriously?
ReplyDeleteI am setting the bar for nerdy.
ReplyDelete