Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Calendar성훈이코드: Difference between revisions

From ZeroWiki
imported>gnstjdok
No edit summary
imported>gnstjdok
No edit summary
Line 12: Line 12:
   
   
== main.cpp ==
== main.cpp ==
 
#include <stdio.h>
#include <stdio.h>
#include "Calender.h"
#include "Calender.h"
 
int main()
int main()
{
{
int year, first;
int year, first;
 
printf("Input the year : ");
printf("Input the year : ");
scanf("%d", &amp;year);
scanf("%d", &year);
printf("Input the first day of week in January (0:Mon -- 6:Sun)");
printf("Input the first day of week in January (0:Mon -- 6:Sun)");
scanf("%d", &amp;first);
scanf("%d", &first);
 
printCalender(year, first);
printCalender(year, first);
 
fflush(stdin);
fflush(stdin);
getchar();
getchar();
return 0;
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;
}