hello. this is my first post in here :)
im new to programming and im learning C as my first language.
I need help on this problem, i am making a running clock and it prints out in this format:
1:1:11
but i would like to make it look like in this format:
01:01:11
here is my code so far, i am using Turbo C :P
i really want to google this problem, but i don't know what to search for. :D
#include <stdio.h>
main()
{
int sec, min, hour;
clrscr();
for (hour=0; hour<=24; hour++)
{
for (min=0; min<=60; min++)
{
for (sec=0; sec<=60; sec++)
{
printf("%d:%d:%d", hour, min, sec);
delay(100000000);
clrscr();
}
}
}
getch();