theclapp

Search theclapp.blog-city.com

 

Chapter 3, ex 4

posted Wednesday, 8-Jan-2003
13:28 -- Starting 3.4, Java version
13:30 -- done
---
// ch03_ex04.java

class ch03_ex04 {
public static void main( String[] args ) {
int i;
for (i = 1; i <= 100; i++) {
System.out.println( i );
}
}
}
---

Gosh, that was hard. ;)

13:31 -- Starting Lisp version
13:32 -- Done

---
;;;; chapter 3, ex 4
(defun ch3-ex4 ()
(loop for i from 1 to 100
do (print i)))
---
Gosh, that was hard, too. (Look, Mom, my first loop!)

links: digg this    del.icio.us    technorati    reddit