我发一个:[mw_shl_code=c,true]#include <time.h>
int main()
{
while(1>0)
{
struct tm*m;
time_t secs;
time(&secs);
time_t now;
time(&now);
m=localtime(&secs);
printf("现在时间^-^:\n");
printf("[\n");
printf(" 中文版^-^:\n");
printf(" %d年%d月%d日 ",m->tm_year+1900,m->tm_mon+1,m->tm_mday);
printf("%d时%d分%d秒\n",m->tm_hour,m->tm_min,m->tm_sec);
printf(" 英文版^-^:\n");
printf(" %s\n",ctime(&now));
printf("]\n");
system("cls");
}
system("pause");
return 0;
}
[/mw_shl_code] |