Quiz 3 Solution - after 2 iterations after 3 iterations...

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

View Full Document Right Arrow Icon
Name: _____________________________ Quiz Three Fill in each cell of the table below with the value of each variable at the end of each iter- ation of the loop in the given program, just like we did in lecture. The initial value column has been completed for you. [10 points] CIS 209 initial value after 1 iteration
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: after 2 iterations after 3 iterations after 4 iterations x 1 3 4 7 11 y 3 4 7 11 18 z 4 7 11 18 29 #include <stdio.h> int main() { int x = 1; int y = 3; int z = 4; while( 0 == 0 ) { if( z > 18 ) break; x = y; y = z; z = y + x; /* what are the values of x, y and z here? */ } return 0; }...
View Full Document

Ask a homework question - tutors are online