ConditionalsAndLoops

ConditionalsAndLoops - COE318 Fall 2008, Olivia Das, Elec....

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 1 Conditionals and Loops: Review if, if/else, if/else if Loops: while, do-while, for COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 2 Boolean Expression Boolean expression evaluates to true or false has equality , relational or logical operators == , != equality operators <, >, <=, >= relational operators COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 3 Boolean Expression Logical Operators : take boolean operands ! Logical NOT (unary) && Logical AND (binary) || Logical OR (binary) COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 4 Boolean Expression Logical NOT: if a is true , !a evaluates to false Logical AND: a && b evaluates to true if both a and b are true Logical OR: a || b evaluates to true if a or b is true Short Circuited operators - logical AND, logical OR COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 5 Boolean Expression (examples) say, I have int x = 3; int y = 5; int z = 3;...
View Full Document

Page1 / 15

ConditionalsAndLoops - COE318 Fall 2008, Olivia Das, Elec....

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online