{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 09 - More Conditionals

# Lecture 09 - More Conditionals - Announc e m e nts 09 M o r...

This preview shows pages 1–2. Sign up to view the full content.

09 More Conditionals Oct 10, 2006 Announcements • A2 - still due Thursday at noon • Grades on web-page – clicker issues still not up, but should be by end of week • A1 going up as they are marked • Mid-term alternate time – e-mail went out. • Mid-term Oct 19th if … else if (true_or_false) { /* do something if the integer value was true */ } else { /* do something else if it was false */ } else.c Logical Operations • Logical operations are mathematical-like operations that return a value of 0 or 1. • They were designed to be used with if statements. Logical Operators (equality) • x==y 0 if x is not equal to y 1 if x is equal to y don’t confuse this with x=y (set x to be equal to y) • x!=y 0 if x is not not equal to y – I.e. equal to y 1 if x is not equal to y Logical Operators Comparison • x>y 0 if x is not greater than y 1 if x is greater than y • x<y 0 if x is not less than y 1 if x is less than y • Also x>=y (greater than or equal to) x<=y (less than or equal to) • logical.c

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

Lecture 09 - More Conditionals - Announc e m e nts 09 M o r...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online