#include <stdio.h> #include <time.h> int main() { time_t now = time(NULL); struct tm *pnow = localtime(&now); char week[][3] = {"日","月","火","水","木","金","土"}; printf("今日は%2d年%2d月%2d日(%s)\n", pnow->tm_year+1900,
pnow->tm_mon + 1, pnow->tm_mday, week[pnow->tm_wday]); return 0; }
댓글 없음:
댓글 쓰기