Learn How to Program in Cby Dr. Kristin Switala
|
|
Answers to Review: Loops (c)
White Box Testing
1. two errors:
- line 9: for(loop = 1; loop < stop; ++loop)
- line 10 should end with a semicolon ;
2. two errors:
- line 10: for(count = 10; count < num; ++count)
- in line 12, there should be three num, not two
3. two errors:
- line 8: for( ; tries > 0; --tries)
- in line 11, add an ampersand before the variable: &answer
|
|