parent
c134ba31b9
commit
9475704ba5
@ -1,13 +0,0 @@
|
||||
int how(int A)
|
||||
{
|
||||
int i,s=0,day;
|
||||
for(i=1;i<=A-1;i++)
|
||||
{
|
||||
if(i%4==0&&i%100!=0||i%400==0) /*****判断是否是闰年******/
|
||||
day=366;
|
||||
else
|
||||
day=365;
|
||||
s=s+day;
|
||||
}
|
||||
return s;
|
||||
} /*****计算公元-年-月-日到输入年份之前的总天数*****/
|
@ -0,0 +1,13 @@
|
||||
void why(int E)
|
||||
{
|
||||
switch(E)
|
||||
{
|
||||
case 1: printf("该日星期一\n");break;
|
||||
case 2: printf("该日星期二\n");break;
|
||||
case 3: printf("该日星期三\n");break;
|
||||
case 4: printf("该日星期四\n");break;
|
||||
case 5: printf("该日星期五\n");break;
|
||||
case 6: printf("该日星期六\n");break;
|
||||
case 7: printf("该日星期日\n");break;
|
||||
}
|
||||
} /*****判断输入日期是星期几*****/
|
Loading…
Reference in new issue