#include#include int main(){ time_t now; struct tm *w; time(&now); w=localtime(&now); printf("%04d/%02d/%02d\n%02d:%02d:%02d\n",w->tm_year+1900, w->tm_mon+1,w->tm_mday,w->tm_hour,w->tm_min,w->tm_sec); return 0;}
本文共 296 字,大约阅读时间需要 1 分钟。
#include#include int main(){ time_t now; struct tm *w; time(&now); w=localtime(&now); printf("%04d/%02d/%02d\n%02d:%02d:%02d\n",w->tm_year+1900, w->tm_mon+1,w->tm_mday,w->tm_hour,w->tm_min,w->tm_sec); return 0;}
转载地址:http://iejkl.baihongyu.com/