ch05Sections1-5

# ch05Sections1-5 - 5.14 Exercises Problems and Projects...

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

5.14 Exercises, Problems, and Projects 5.14.1 Multiple Choice Exercises 1. a < b true a != b true a == 4 false ( b – a ) <= 1 false Math.abs( a – b ) >= 2 true ( b % 2 == 1 ) true b <= 5 true 2. !a false true false a || c true !( a || b ) false !a || b true !( !( a && c ) ) false false 3. yes 4. yes 5. no 6. yes 7. a < b || b < 10 no a != b && b < 10 yes a == 4 || b < 10 yes a > b && b < 10 no 8. if, else if, else 9. using the equals method 5.14.2 Reading and Understanding Code 10. true 11. false 12. Inside true block End of sequence 13. 27 is divisible by 3 End of sequence 14. String is not hello End of sequence 15. C Done 16. Hello 3 Hello 4 Done 17. Season is Summer AF_CH05.doc Page 1

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

View Full Document
18. letter 2 19. Number 3 Number 4 Other number 5.14.3 Fill in the Code 20. if ( a ) b++; 21. if ( a ) b += 2; else b--; 22. if ( a ) a = false; else a = true; 23. if ( b == c ) a = true; 24. if ( b < c )
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

ch05Sections1-5 - 5.14 Exercises Problems and Projects...

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

View Full Document
Ask a homework question - tutors are online