输入时间
输入时间时想要输入比如说02:03:03,应该用什么格式?
int h,m,s;
scanf("%d:%d:%d",&h,&m,&s);
程序代码:struct time 定义格式如下:
struct time
{
unsigned char ti_min; /* Minutes */
unsigned char ti_hour; /* Hours */
unsigned char ti_hund; /* Hundredths of seconds */
unsigned char ti_sec; /* Seconds */
};