SUNY Geneseo Department of Computer Science


Logic

{Date}

CSci 240, Spring 2007
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Questions?

Reasoning about Conditionals

Sections 5.1 through 5.5

p q if p then q
T T T
T F F
F T T
F F T

Examples

        read character c
        until c >= '0' and c <= '9'
            print error message
            read character c
        read c
        while ! ( c >= '0' && c <= '9' )
            print error message
            read c
        read c
        while c < '0' || c > '9'
            print error message
            read c

[NAND Gate with Both Inputs Connected to 'a']

Hand out problem set 3

Next

Recursion review

Read section 6.1


Next Lecture