I would tackle this program by simply reading the input in as a string. Then individual elements in the string can be parsed by referencing the element location...
1 2 3 4 5 6 7 8 9 10
string input;
fin >> input;
for (int i = 0; input[i]; i++)
{
cout << input[i] << endl;
}
And then if you want to be able to use these individual numbers, convert it to an int as such:
1 2
//n represent any possible element in the string
int number = input[n]