#include // this program computes the positive and negative sums of a set // of MAXNUMS user entered numbers int main() { const int MAXNUMS = 5; int i; float usenum, postot, negtot; postot = 0; // this initialization can be done in the declaration negtot = 0; // this initialization can be done in the declaration for (i = 1; i <= MAXNUMS; i++) { cout << "Enter a number (positive or negative) : "; cin >> usenum; if (usenum > 0) postot = postot + usenum; else negtot = negtot + usenum; } cout << "The positive total is " << postot << endl; cout << "The negative total is " << negtot << endl; return 0; }