More actions
imported>gnstjdok No edit summary |
imported>gnstjdok No edit summary |
||
| Line 12: | Line 12: | ||
== main.cpp == | == main.cpp == | ||
#include <stdio.h> | |||
#include | #include "Calender.h" | ||
#include "Calender.h" | |||
int main() | |||
int main() | { | ||
{ | int year, first; | ||
printf("Input the year : "); | |||
scanf("%d", &year); | |||
printf("Input the first day of week in January (0:Mon -- 6:Sun)"); | |||
scanf("%d", &first); | |||
printCalender(year, first); | |||
fflush(stdin); | |||
getchar(); | |||
return 0; | |||
} | |||
} | |||
Revision as of 09:22, 22 May 2012
Calendar.h
#include <stdio.h> void printCalender(int year, int first); void printFirstTab(int month, int year); int printDays(int month, int year, int leftDays); void print_space(); void print_days(int day); int daysOfMonth(int month, int year); int IsLeafYear(int year);
Calendar.cpp
main.cpp
#include <stdio.h>
#include "Calender.h"
int main()
{
int year, first;
printf("Input the year : ");
scanf("%d", &year);
printf("Input the first day of week in January (0:Mon -- 6:Sun)");
scanf("%d", &first);
printCalender(year, first);
fflush(stdin);
getchar();
return 0;
}