a combination of several output format specifiers using printf() or cout should do the trick. Otherwise you could use an if statement checking if minutes is less than 10. If so print a zero before printing the minutes, else just print the minutes.