Ch06_Questions

Ch06_Questions - C Programming From Problem Analysis to Program Design 2nd edition ISBN 1423901460 Chapter 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 d

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

View Full Document Right Arrow Icon
C# Programming: From Problem Analysis to Program Design , 2nd edition ISBN 1423901460 Chapter 5 1. d. to allow statements to be repeated 2. b. 1000 3. a. foreach 4. d. do…while 5. b. for 6. d. continue 7. b. while (counter < 10) 8. a. for (num = 0; num < 10; num++) 9. d. 2 10. c. Computes the sum of even integers from1 through n 11. b. n < 10 12. a. 0 13. e. a and c above 14. d. curly braces 15. d. five times Doyle: C#, 2nd edition ISBN 1423901460    Page 1-1
Background image of page 1

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

View Full DocumentRight Arrow Icon
c. the number of negative items entered 17. a. counter controlled loop 18. a. 20 19. b. 6 20. d. an infinite loop 21. for (int counter = 100; counter > 0; counter--) { Console.WriteLine(counter); } int counter = 100; // while example while (counter > 0) { Console.WriteLine(counter); counter--; } Final result is the same for all three loop constructs. Both the for statement and the while statement are tested before entry into the loop. 22.
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.

This note was uploaded on 06/24/2011 for the course CIS 170 taught by Professor Michaelfreeman during the Spring '10 term at DeVry Chicago.

Page1 / 6

Ch06_Questions - C Programming From Problem Analysis to Program Design 2nd edition ISBN 1423901460 Chapter 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 d

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