CS 160

Feb 27

Today's class
  • First, I gave a simple example for looping a counter. (1 below)
  • Second, I gave an example for computing the sum from 1 to max. (2 below)
  • Third, I gave an example for computing the GCD for two integers. (3 below)
  • Fourth, a simple for loop
  • Finally, the triangle example using a for loop. (see 5 below)
1. Count.java 2. Sum.java
3. Gcd.java 4. ForLoop.java
5. Triangle.java