I have a code that appends text into a text file but I need to do it in such a way that there is a separation of a specific number of spaces between the data entered. For example my program asks the user to input text 4 times so it would look like this:
enter name: Mike
enter middle name: Jason
enter last name: Bell
enter age: 24
Now the text file will contain the following:
MikeJasonBell24
However, I need it to be displayed such that first name has a 'limit' of 10 spaces, middle name 6 spaces, last name 5 space, age 2 spaces. So the text file will contain the following:
Mike Jason Bell 24
Please let me know if there is any confusion in the question.