Example of running the final program:
Enter the hour in 24h format (0-23): 0 Enter the minute (0-59): 5 The time in 12h format is 12:05AM. The time in 24h format is 00:05.
#include <stdio.h>after the iosteam include to gain access to printf(). (Note: in class I left off the .h but Helios's compiler doesn't like this for this file. When in doubt, put the .h on the included filename). printf() has a special formatting string that will add the 0 padding to hours or minutes less than 10 automatically. That formatting string is %0<col>d for integers. For example, for the clock digit, the column width is 2, so the formatting string would be %02d. The "0" flag tells printf() to pad with 0s so if the clock digit is less than 10, it will display 0x but if the digit is 10 or higher, it will display just the digit. Rewrite your function to use printf() with this formatting string instead.