View Single Post
  #1 (permalink)  
Old May 30th, 2006, 05:15 AM
Nick Y Nick Y is offline
Authorized User
 
Join Date: May 2006
Location: Iver, Bucks., United Kingdom.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ex 10, Chapter 5, page 253

Receiving a Variable Number of Arguments

Answers (10 and 172630728) are incorrect; they should be 42 and 473.

Count integers (6 and 9) are missing after start of brackets of 'cout' lines.

i.e.
 cout<< sum(6, 2,4,6,8,10,12) <<endl;
 cout<< sum(9, 11,22,33,44,55,66,77,66,99) <<endl;

(Also note, second list has 66 twice and not 88 as one might assume.)