#include ".h"
int 계(int year){
if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
return 29;
}
else
{
return 28;
}
}
int (int nameofDay, int year, int month){
printf(" %d, %d\n", month, year);
printf("---------------------------------------------------\n");
printf("Sun Mon Tue Wed Thu Fri Sat\n");
switch(nameofDay){
case 0:
break;
case 1:
printf("\t");
break;
case 2:
printf("\t\t");
break;
case 3:
printf("\t\t\t");
break;
case 4:
printf("\t\t\t\t");
break;
case 5:
printf("\t\t\t\t\t");
break;
case 6:
printf("\t\t\t\t\t\t");
break;
default:
break;
}
return 0;
}
int (int , int , int ){
int endday, count, count;
if( == 1 || == 3 || == 5 || == 7 || == 8 || == 10 || == 12){
endday = 31;
}
else if( == 4 || == 6 || == 9 || == 11){
endday = 30;
}
else
{
endday = 계();
}
(,,);
for(count = 1, count = + 1;count <= endday; count++, count++){
printf("%d\t", count);
if(count == 7){
printf("\n");
count = 0;
}
}
printf("\n\n");
return 0;
}
int 까(int , int , int ){
int endday;
if( == 1 || == 3 || == 5 || == 7 || == 8 || == 10 || == 12){
endday = 31;
}
else if( == 4 || == 6 || == 9 || == 11){
endday = 30;
}
else
{
endday = 계();
}
return (( + endday) % 7);
}