problem with arduino communication with user

Hey guys I have the following problem
I made a program and arduino asks the user for a number...then for a second number but arduino wont wait for answer and terminates the program. Yes i put the command while(Serial.available()==0){ }
Yes i have downloaded the latest version of arduino but i still have the problem...Please help!!!

See Read this before posting a programming question then post your code

An educated guess is that you have the Line ending in the Serial monitor set to something other than "No line ending"