Desc :

 

 


Source Code :

#include <stdio.h>
#include <time.h>

void main()
{
	struct tm chrismas = { 0,0,0,25,12-1,2021-1900}; // 날짜 초기화
	char *wday[] = { "일","월","화","수","목","금","토" };
	char buff[100];

	mktime(&chrismas); // 요일 변환됨

	strftime(buff, sizeof(buff), "2021년 12월 25일은 %A입니다", &chrismas); // 영문으로 설정

	puts(buff);
	printf("2021년 12월 25일은 %s요일입니다.\n", wday[chrismas.tm_wday]);
}

 


Result :

+ Recent posts