Sections 0101, 0102, 0103 and Honors, Fall 1995

Tuesday September 19, 1995


Assigned Reading: 3.1 - 3.3

Handouts (available on-line): Program and Program and sample run.

  • without using a break statement. Program and sample run.
  • using side effects (bad style) Program and sample run.
  • We discussed several indentation styles.
  • Some simple programs using an if statement.
    Testing an input integer to check if it is even or odd: Program and sample run. Testing an input integer to check if it is positive, negative or zero: Program and sample run.
  • A very common bug is using one = instead of == to test for equality in an if statement. A seemingly correct program can produce strange results. Program and sample run.
  • Discussed Project 1.
    Last Modified: Wed Sep 20 10:19:01 EDT 1995

    Richard Chang, chang@gl.umbc.edu