% You are given an array x of real numbers, indexed from 0 to n-1 real sumPositive = 0; int i = 0; while (i < n) { if (x[i] > 0) sumPositive += x[i]; i++; } cout << sumPositive << endl;