Appendix A 481
Additional Lab Exercises
General Programming Techniques
Solution—Using Masks, Step 1
Figure A-9 shows a solution for step 1.
Figure A-9. The Mask Test, Step 1
Using Masks, Step 2
Add to the program to calculate and display the percentage of failures.