본문내용
/*
♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡
♡ ♡
♡ 만 년 달 력 ♡
♡ ♡
♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡
*/
#include
#include
void input(void); //몇년 몇월의 달력을 뽑을지 입력하는 함수
void output(void); //달력 출력하는 함수
int calculate(void); //만년력 계산 함수
int L_year(int); //L=leap, 윤년 계산 함수
void control(void); //계속 할지 안할지 콘트롤 하는 함수
static int year,month;
char *months[12] = {"01월", "02월", "03월", "04월", "05월", "06월", "07월", "08월", "09월", "10월", "11월", "12월"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; //전역변수로 year,month,months[],days[]선언
void main(void)
{
input();
output();
control();
}
void input(void)
{
do {
printf(" 원하는 달력의 연도를 입력하세요: ");
scanf("%d",&year);
printf(" 원하는 달력의 달을 입력하세요: ");
scanf("%d",&month);
if ((month>=1)&&(month<=12)) //13이상의 수가 입력되면 에러 표시
break;
else
printf(" ERROR!! 장난치냐? %d월이란게 있냐? ㅡㅡ;;\n\n",month);
} while(1);
}
void output(void)
{
int firstday; //선택한 달력의 첫날 표시를 위한 변수
int day, temp2; //day->각 월별 최대날짜, temp2->계산을 위한 임시변수
int i,cnt; //i->제어문을 위한 변수, cnt->계산을 위한 임시변수
printf("\n");
printf("\t\t\t┏━━━━━━━━━━━━━┓\n");
printf("\t\t\t┃ ★ %d년 ★ ┃ \n", year); //몇년인지 출력
♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡
♡ ♡
♡ 만 년 달 력 ♡
♡ ♡
♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡
*/
#include
#include
void input(void); //몇년 몇월의 달력을 뽑을지 입력하는 함수
void output(void); //달력 출력하는 함수
int calculate(void); //만년력 계산 함수
int L_year(int); //L=leap, 윤년 계산 함수
void control(void); //계속 할지 안할지 콘트롤 하는 함수
static int year,month;
char *months[12] = {"01월", "02월", "03월", "04월", "05월", "06월", "07월", "08월", "09월", "10월", "11월", "12월"};
int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; //전역변수로 year,month,months[],days[]선언
void main(void)
{
input();
output();
control();
}
void input(void)
{
do {
printf(" 원하는 달력의 연도를 입력하세요: ");
scanf("%d",&year);
printf(" 원하는 달력의 달을 입력하세요: ");
scanf("%d",&month);
if ((month>=1)&&(month<=12)) //13이상의 수가 입력되면 에러 표시
break;
else
printf(" ERROR!! 장난치냐? %d월이란게 있냐? ㅡㅡ;;\n\n",month);
} while(1);
}
void output(void)
{
int firstday; //선택한 달력의 첫날 표시를 위한 변수
int day, temp2; //day->각 월별 최대날짜, temp2->계산을 위한 임시변수
int i,cnt; //i->제어문을 위한 변수, cnt->계산을 위한 임시변수
printf("\n");
printf("\t\t\t┏━━━━━━━━━━━━━┓\n");
printf("\t\t\t┃ ★ %d년 ★ ┃ \n", year); //몇년인지 출력
소개글