I think when you define int num( 100), you can initialize the whole array to a fixed value (preferably a value that can't fit behind), such as 0 or the constant INT_MAX in C. In this case, when you save a certain number of numbers in the array, use a loop statement to search the array from beginning to end. When you encounter a value that is not specified by you,
int count = 0;
for(I = 0; I< 100; i++)
{
if(num[i]! = specified value)
{
count++;
}
other
{
Break;
}
}
Cout & lt& lt "deposited"