instead of grabbing number by number, why don't you have them input the full number:
Code
System.out.print("Enternumber: "); // prompt user for number
number = input.nextLine();
Then parse the String using decimal.Parse(string)
Code
decimal d = decimal.Parse(number);
If you want to go number by number, when don't you pull the input as an input.nextLine(), then check to see if it matches a "." string, else it's a number. Then just append all of it later