while loop issue

I know this must be a newbie error, but for the life of me, I can't see why the second request for INT input is ignored.

The following code asks two(2) sequential input questions and reads the int input "before moving on to the nest code":

void loop(){
Serial.println(" How many times do you want the red led to blink");
while (Serial.available()==0){} //wait for input
numblinkredled = Serial.parseInt(); //read input

Serial.println(" How many times do you want the green led to blink");
while (Serial.available()==0){} //wait for input
numblinkgreenled = Serial.parseInt(); //read input

A "for" loop count code is used to complete the program

The result is as follows:

it asks for the red blink number;
it reads the int input;
it asks for the green blink number;
it DOES NOT READ THE GREEN INT INPUT; //it does not wait for INT input
it completes the red blink count;
it does not do a green count
it starts the loop over again

The issue seems to be the second "WHILE loop" is being ignored. Help anyone?
thanks

Usual question: are you using the serial monitor, and what is the line ending set to?

Yes...serial monitor.

Serial.println(" ");

What is the serial monitor line ending set to?

I hate to take your time, but I'm a newbie so here is the complete code I'm working with:

void loop(){
Serial.println(" How many times do you want the red led to blink");
while (Serial.available()==0){} //wait for input
numblinkredled = Serial.parseInt(); //read input

Serial.println(" How many times do you want the green led to blink");
while (Serial.available()==0){} //wait for input
numblinkgreenled = Serial.parseInt(); //read input

Serial.println(" ");

Serial.println(redmessage);
for(int j=1; j<=numblinkredled; j=j+1){ //counter
Serial.print(" You are on blink #: ");
Serial.println(j); //print increment
digitalWrite(redled,HIGH); // red led on
delay(redon); // led on time
digitalWrite(redled,LOW); // red off
delay(redoff); // led off time
}

Serial.println(greenmessage);
for(int j=1; j<=numblinkgreenled; j=j+1){
Serial.print(" You are on blink #: ");
Serial.println(j);
digitalWrite(greenled,HIGH);
delay(greenon);
digitalWrite(greenled,LOW);
delay(greenoff);
}
Serial.println(" ");
}

thanks for your help

At the bottom of the serial monitor window is a control named "Line-ending".

What is it set to?

Please remember to use code tags when posting code.

"newline"

Change it to "none"

Retest.

Report back.

worked.....2 days to learn a lesson. thanks so much......where can I find info on the serial monitor functions?

I would like to know more about the impact of the selections within the monitor window

Here’s an old thread that might be helpful.
https://forum.arduino.cc/index.php?topic=63662.0