Chapter 8 IM Answers

Chapter 8 IM Answers - An Introduction to Programming with...

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

View Full Document Right Arrow Icon
An Introduction to Programming with C++: Fifth Edition 978-1-4188-3618-4 Chapter 8 Answers CONCEPT LESSON REVIEW QUESTIONS 1. a after 2. a do while 3. c 1, 2, 3, 4 4. d 20, 16, 12 5. b 8 6. b 1, 3 7. a *** *** 8. d 30 EXERCISES – PENCIL AND PAPER 1. while (quantity >= 0); 2. while (inStock > reorder); 3. while (toupper(letter) == ‘Y’); 4. do { cout << evenNum << endl; evenNum = evenNum + 2; } while (evenNum < 9); (or while (evenNum <= 8); ) 5. for (int x = 1; x < 4; x += 1) { cout << x << " "; for (int y = 0; y < 10; y += 1) cout << x * y << " "; //end for y cout << endl; } //end for x 6. int x = 1; while (x < 4) { cout << x << " "; int y = 0; while (y < 10) { cout << x * y << " "; y += 1; } //end while cout << endl; x += 1; } //end while 7. int x = 1; do { cout << x << " "; int y = 0;
Background image of page 1

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

View Full DocumentRight Arrow Icon
do { cout << x * y << " "; y += 1; } while (y < 10); cout << endl; x += 1; } while (x < 4); 8. int x = 1; while (x < 4) { cout << x << " "; for (int y = 0; y < 10; y += 1) cout << x * y << " "; //end for
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Chapter 8 IM Answers - An Introduction to Programming with...

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

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