Section_2_5_s3 - if (y<x) { a=5; b=5; } else if...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 2.5: Control statements 1 Next Slide Previous Slide Two examples (1,2) x = 1; y = 2; z = 3; if (x<y) a=5; if (y<z) b=5; if a=1; if (z<y || x<y) b=1; if (z != x) b=2; // what do a and b equal? x = 1; y = 2; z = 3;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if (y&lt;x) { a=5; b=5; } else if (z&gt;y &amp;&amp; y&gt;x) { a=2; b=1; } else { a = 3; b = 3; } // what do a and b equal? a=1 and b=2 a=2 and b=1 X X control_block_1.cpp control_block_2.cpp...
View Full Document

This note was uploaded on 05/19/2008 for the course ENGR 25 taught by Professor All during the Spring '08 term at Lehigh University .

Ask a homework question - tutors are online