Int main (void)
{
Int day, index, number, I, b [100], [100], z j;
Int power (int a, int b);
The scanf (" % d % d % d ", & amp; Day, & amp; The index, & amp; Number);
For (j=0, z [0]=number, I=0; j<=5; J++)
{
B=z [j]/[j] power (10, 5 - j);
Z=z [j] [m + 1] % power (10, 5 - j);
}
If (index<200)
{
Printf (" % d no \ n ", b [5]);
}
If (index<400 & amp; & Index>
=200){
If (day 6==| | day==7)
{
Printf (" % d no \ n ", b [5]);
}
The else switch (day)
{
Case 1:
If (number==1 | | number==6)
{
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
}
break;
Case 2: if (number==2 | | number==7) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
Case 3: if (number==3 | | number==8) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
Case 4: the if (number==4 | | number==9) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
Case 5: if (number==5 | | number==0) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
}
}
If (index>
=400){
If (day 6==| | day==7)
{
Printf (" % d no \ n ", b [5]);
}
The else switch (day)
{
Case 1: case 3: case 5: if (number==1 | | number==| 3 | number==5 | | number==7 | | number==9) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
Case 2: case 4: the if (number==0 | | number==2 | | number 4==| | number 6==| | number==8) {
Printf (" % d yes \ n ", b [5]);
} else {
Printf (" % d no \ n ", b [5]);
} break;
}
}
return 0;
}
Int power (int a, int b)
{
Int c=1, I;
for(i=0; i{
C *=a;
}
return c;
}
CodePudding user response:
I know that I was too carelessCodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.htmlI hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html