|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
int year,d,j,D,Z,di,did,m,n,x,y,z,h,k,l,jian,Z1;
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
scanf("%d",&year);
|
|
|
|
|
Z=how(year);
|
|
|
|
|
for(j=1;j<=12;j++)
|
|
|
|
|
{
|
|
|
|
|
d=Z%7;
|
|
|
|
|
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
|
|
|
|
|
printf(" %d<>·<EFBFBD>\n",j);
|
|
|
|
|
printf("sun mon tue wed thu fri sat\n");
|
|
|
|
|
if(d<6)
|
|
|
|
|
for(di=1;di<=d+1;di++)
|
|
|
|
|
printf(" ");
|
|
|
|
|
for(did=1;did<=where(year,j);did++)
|
|
|
|
|
{
|
|
|
|
|
printf("%d",did);
|
|
|
|
|
if(did<10) printf(" ");
|
|
|
|
|
else printf(" "); /*****<2A>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD><EFBFBD>*****/
|
|
|
|
|
if(did==6-d||(did-6+d)%7==0||did==where(year,j))
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
Z=Z+where(year,j);
|
|
|
|
|
}
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
scanf("%d%d",&m,&n);
|
|
|
|
|
Z=how(m);
|
|
|
|
|
for(j=1;j<=n-1;j++)
|
|
|
|
|
{
|
|
|
|
|
D=where(m,j);
|
|
|
|
|
Z=Z+D;
|
|
|
|
|
}
|
|
|
|
|
d=Z%7;
|
|
|
|
|
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
|
|
|
|
|
printf(" %d<>·<EFBFBD>\n",j);
|
|
|
|
|
printf("sun mon tue wed thu fri sat\n");
|
|
|
|
|
if(d<6)
|
|
|
|
|
for(di=1;di<=d+1;di++)
|
|
|
|
|
printf(" ");
|
|
|
|
|
for(did=1;did<=where(year,j);did++)
|
|
|
|
|
{
|
|
|
|
|
printf("%d",did);
|
|
|
|
|
if(did<10) printf(" ");
|
|
|
|
|
else printf(" ");
|
|
|
|
|
if(did==6-d||(did-6+d)%7==0||did==where(year,j))
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
scanf("%d%d%d",&x,&y,&z);
|
|
|
|
|
Z=how(x);
|
|
|
|
|
for(j=1;j<=y-1;j++)
|
|
|
|
|
{
|
|
|
|
|
D=where(x,j);
|
|
|
|
|
Z=Z+D;
|
|
|
|
|
}
|
|
|
|
|
Z=Z+z;
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD>뵱ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
|
|
|
|
|
scanf("%d%d%d",&h,&k,&l);
|
|
|
|
|
Z1=how(h);
|
|
|
|
|
for(j=1;j<=k-1;j++)
|
|
|
|
|
{
|
|
|
|
|
D=where(k,j);
|
|
|
|
|
Z1=Z1+D;
|
|
|
|
|
}
|
|
|
|
|
Z1=Z1+1;
|
|
|
|
|
jian=Z1-Z;
|
|
|
|
|
if(jian<0) jian=-jian; /*****ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*****/
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ھ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d<><64>\n",jian);
|
|
|
|
|
d=Z%7;
|
|
|
|
|
why(d);
|
|
|
|
|
when(y,z);
|
|
|
|
|
system("pause"); /*****ǿ<><C7BF><EFBFBD><EFBFBD>ͣ*****/
|
|
|
|
|
return 0;
|
|
|
|
|
}
|