Originally posted on Programming Praxis:
In their book The C Programming Language, Brian Kernigan and Dennis Ritchie say that the first program every programmer should write is a program that writes “Hello, world!” to the console. Then they give the second program that produces a fahrenheit/celsius temperature conversion table, with fahrenheit temperatures every 20 degrees from 0 to 300 and the corresponding celsius temperature to the nearest degree, each pair written on its own line with the two temperatures separated by tabs.
The hello program is simple:
(display "Hello, world!")
The temperature conversion table isn't much harder. We follow K&R by using a
do-loop and calculating the celsius temperature in-line instead of in…
View original 65 more words