#include using namespace std; // Maximum values to store. const int MAX=50; int main() { int a[MAX]; int i=0; int size=0; int value; do { cout << "Enter a number (-1 to indicate end of input): "; cin >> value; // Only store the non -1 values. if(value!=-1) { a[i]=value; // Keep track of how many numbers where read in. size++; // Next element. i++; } }while(value!=-1 && size