Added provision to read till spaces in case of int

Added code, so that it can read till spaces in cases of integers,
provided that the measures has to be taken care before doing so.