teaching machines

CS 145 Lecture 23 – Loops V

October 24, 2014 by . Filed under cs145, fall 2014, lectures.

Agenda

TODO

What Does This Do?

  1. show
  2. show
  3. show

Blackboxes

Code

ForFor.java

package lecture1024;

public class ForFor {
  public static void main(String[] args) {
    mystery();
  }
  
  public static void mystery() {
    for (int r = 1; r <= 5; ++r) {
      for (int c = r; c >= 0; --c) {
        System.out.print(c);
      }
      System.out.println();
    }
  }
}

Haiku

show