Quote (AbDuCt @ Oct 30 2012 12:29am)
you are trying to add uninitialized numbers. an uninitialized integer us usually the maximum integer size which is like 2,147,483,647 for a signed integer.
to fix this code move your sum = xxx statement below all your cin statements and above your cout statement printing sum
ok thank you its working now