First, declare something like this:
double value, postotal, negtotal;
Then the end of the loop should check for negativity like this: If it's greater than 0, add value to postotal, else add value to negtotal.

Then close the loop and have it display the positive and negative totals using the correct variables.