Hello,
Am trying to get the user to input a series of numbers that will be store into an array. My range is between 1 and 100, anything over that or under can't be accepted and the user must know. Occurs any number that are not in range can't be included in the array. Now my problem is that I want to end the input by entering a blank line which is conflicting with my range.

here is my code

Code:
int choiceRead(int num1[], int size)
{
    int count=0;
    char input[100];
    
    //this will be the keyboard input of the numbers you want to use to create the chart and the statistics
    cout << "Please enter a data between 1 and 100 when your done please press enter: \n";
    while ( cin.getline(input, 100) )
    {
        if (atoi(input) > 100 || atoi(input) <= 0)
        {
                cout << "you enter a number out-of-range.Please try again: ";
                continue;
        }
        else
        {
        num1[count++] = atoi(input);
        if ( count >= size ) 
            break;
        if (count > 100 || count < 0) 
            break;
        if ( strlen(input) == 0 )  // This end the loop that ask for numbers
            break;
        }
    }


    return count - 1; // this will remove the last count because it will be read as "Zero"
}