Write a loop that will read in a list of even numbers (such as 2, 24, 8, 6)
and compute the total of the numbers on the list. The list is ended with a
sentinel value. Among other things, you must decide what would be a
good sentinel value to use.
You can use any odd number as a sentinel value.
int sum = 0, next;
cout << "Enter a list of even numbers. Place an\n"
<< "odd number at the end of the list.\n";
cin >> next;
while ((next % 2) == 0)
{
sum = sum + next;
cin >> next;
}