Originally Posted by
tabstop
Since that's exactly what you want and need to happen, I fail to see how that's a problem.
(Or is your task not to add, but to count? In that case you would always add 1, since that's how people count.)
Ok so can I do this?
Code:
int sum =0;
int n;
cout << enter number;
cin >> n;
for (int i = 1 ; i < n ; i++ )
if ( n % i = 0 )
sum += i