You need to know the final base size, and then from that compute back the number of spaces you need to print out (should be 1-less each iteration through).