... the selection sort analog of what was done for the quick sort in Display 20 .5.)
20 _CH20.fm Page 848 Monday, August 18, 20 03 2: 08 PM
Answers to Self-Test Exercises 851
Self-Test Exercises
can add ... startIndex + 1;
index < sentinelIndex; index++)
Chapter Summary
20 _CH20.fm Page 851 Monday, August 18, 20 03 2: 08 PM
8 52 Patterns and UML
if (a[index] < min)
{
min = a[in...
... "
20 << totalCalories << endl;
21 return 0;
22 }
S
AMPLE
D
IALOGUE
How many items did you eat today? 7
Enter the number of calories in each of the
7 items eaten:
300 60 120 0 600 ...
Statement_1
Statement _2
.
.
.
Statement_Last
} while (
Boolean_Expression
);
Display 2. 4 Example of a
while Statement
(part 1 of 2)
1 #include <iostream>
2 using na...
... 24 0 Wednesday, August 13, 20 03 12: 54 PM
Structures 23 3
Display 6 .2 A Structure with A Structure Member
(part 2 of 2)
41 << "-" << account.maturity.year << endl
42 ...
to the values
1 and 2, respectively.
06_CH06.fm Page 23 5 Wednesday, August 13, 20 03 12: 54 PM
23 8 Structures and Classes
Display 6.3 Class with a Member Function
(part 2...