In addition to the direct answers to your question above from ehdonhon and Ovid, I would just like to add a link through to the excellent tutorial on the printf function by reptilehere - Its an excellent overview of the function and how to use it and should answer any further questions or concerns that you have with this function.