文章
1
粉丝
45
获赞
0
访问
748
为什么一直75%啊啊啊啊,那位大佬给我说说?
#include<stdio.h>
int days[]={0,30,31,30,31,31,30,31,30,31};
int sum_day(int m,int n){
int sum=0;
int i;
for(i=0;i<=m-4;i++){
sum+=days[i];
}
sum=sum+n-12;
return sum;
}
int main(){
int m,n;
int cur=4,w;
scanf("%d",&m);
scanf("%d",&n);
cur=cur+sum_day(m,n);
w=cur%7;
switch(w)
{
case 0:printf("Sunday");break;
case 1:printf("Mothday");break;
case 2:printf("Tuesday");break;
case 3:printf("Wednesday");break;
...
登录后发布评论
检查一下各个星期几的英文拼写是否正确