Output question (loop/erase)

I certainly did not give you that solution.

if (x < 10) {
  Serial.print (" ");
}
Serial.print (x);

is pretty much what I wrote.