Picture of what the program is supposed to do:

![screenshot 1](https://i.stack.imgur.com/Ujbgi.png)

```
    #include <iostream>
    using namespace std;

    int main(){

    int nums[10],n,i=0;
    int s[10],popS[10];
    int sum=0;
    int numSum;

```

How can I enter an unknown amount of values for array nums with a termination value of -1?

```
    cout<<"Elements being placed in Stack,s"<<endl;
    for(int i=0;i<10;i++){
    push(s,nums[i]);
    }

    cout<<"Popping the stack..."<<endl;
    for(int i=0;i<10;i++){
    popS[i]=pop(s);
    }

    for(int i=0;i<10;i+=2){
    numSum=popS[i];
    sum+=numSum;

    }

    cout<<"The sum for every other element pop is "<<sum<<endl;
    return 0;
    }

```

I am trying to enter values into array nums but the number of values isn't supposed to be known and terminated by -1.