Please, take a look. What may be wrong? Program works also when I add new number[Enter] at the end of input data. So no data is missing in output.