Chapter 4 Homework.docx - Chapter 4 Homework 2 false true 4 braces 6 default 8 true 10 lower 12 | 14 integer 16(A 1(B 0(C 0(D 1 18 if(y = 10 x = 0 else

# Chapter 4 Homework.docx - Chapter 4 Homework 2 false true 4...

• Homework Help
• 2

This preview shows page 1 - 2 out of 2 pages.

Chapter 4 Homework 2. false; true 4. braces 6. default 8. true 10. lower 12. || 14. integer 16. (A) 1 (B) 0 (C) 0 (D) 1 18. if (y = 10) x = 0; else x = 1; 20. If hours = = 10 then Set hours = 10; 22. if (choice == 1) { cout << fixed << showpoint << setprecision (2); } else if ((choice == 2) || (choice == 3)) { cout << fixed << showpoint << setprecision (4); } else if (choice == 4) { cout << fixed << showpoint << setprecision (6);
} else { cout << fixed << showpoint << setprecision (8); } 24. (A) (x >= 0) || (x <= y) (B) (z - y) > y (C) !((z - y) > x) 35. (A) Semicolon at the end of cout statement is terminated too early. The definition of score1, score2, and score3 should end with a semicolon. In the statement of ‘ if (average= 100); ’ it needs an ‘==’ sign and it should not end with a semicolon. Also, perfectScore is used before it is declared.

• Fall '19

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern