#include <stdio.h> #include <time.h> int main(){ time_t now = time(NULL); struct tm *pnow = localtime(&now); char buf[128]=""; sprintf(buf,"%d:%d:%d",pnow->tm_hour,pnow->tm_min,pnow->tm_sec); printf(buf);
getchar(); return 0; }
댓글 없음:
댓글 쓰기