1. seperate and add pos and neg numbers

I'm just starting out with C++ and have a problem for my class which requires the user to input 5 integers positive or negative then it is suppose to break it down by adding all of them, adding just the neg. and adding just the pos. and print each to the screen. I have the initial addition of all numbers fine and i've tried several different ways to get the neg and pos numbers to add on there own if anyone could help it would be much appreciated

the output should be something like after entering: 3 8 -4 -6 0

the total sum is: 1
neg sum is: -10
and pos sum is: 11

like i said i have the output statments and all done i just haven't the slightest clue how to get neg sum and pos sum

thanks

2. I would imagine something along this line:
Code:
```   for ( i = 0; i < 5; ++i )
{
// get value

if ( value < 0 )
{
sumneg += value;
}
else
{
sumpos += value;
}
totalsum += value;
}
// print results```

3. >> i've tried several different ways to get the neg and pos numbers to add on there own
Show what you tried that did not work (in [code][/code] tags) and tell us what output you got that is wrong. If you tried a bunch of things, show what you think is your best shot. Somebody can probably steer you in the right direction.