set a variable at the beginning then add them all up:
eg.
int total = 0;
for ( int i = 0; i < 10; i++ )
{
total = total + i;
}
cout << total;
Last edited by iamthwee; Sep 17th, 2009 at 5:14 pm.
Reputation Points: 1536
Solved Threads: 431
Posting Expert
Offline 5,865 posts
since Aug 2005