#include <stdio.h>
#include <string.h>
int main()
{
char a1[61]={'\0'}, a2[61]={'\0'}, b1[61]={'\0'}, b2[61]={'\0'};
int a1_len =(int) strlen(a1);
int a2_len = (int)strlen(a2);
int b1_len = (int)strlen(b1);
int b2_len = (int)strlen(b2);
scanf_s("%s", a1, 61);
scanf_s("%s", a2,61);
scanf_s("%s", b1,61);
scanf_s("%s", b2,61);
int i;
int flag = 0;
for (i = 0; (i < a1_len) && (i < a2_len); i++)
{
if (( a1[i] >= 'A') && (a1[i] <= 'G')&&(flag==0)&&(a1[i] == a2[i]))
{
switch (a1[i] - 'A' + 1)
{
case 1: {printf("MON"); break; }
case 2: {printf("TUE"); break; }
case 3: {printf("WED"); break; }
case 4: {printf("TUE"); break; }
case 5: {printf("FRI"); break; }
case 6: {printf("SAT"); break; }
case 7: {printf("SUN"); break; }
}
flag++;
}
if ((flag == 1) &&( a1[i] == a2[i]) )
{
if ((a1[i] >= '0') && (a1[i] <= '9'))
{
printf("0%d", a1[i] - '0');
break;
}
if ((a1[i] >= 'A') && (a1[i] <= 'N'))
{
printf("%d", a1[i] - 'A' + 10);
break;
}
}
}
for (i = 0;( i <b1_len) &&( i < b2_len); i++)
{
if ((b1[i] == b2[i]) && ((b1[i] >= 'a') &&( b1[i] <= 'z') ||( b1[i] >= 'A') &&( b1[i] <= 'Z')))
{
if (i < 10)
printf("0%d", i);
else
printf("%d", i);
break;
}
}
return 0;
}
不能正常输出,找了半天实在不知道问题在哪,请大家帮我看看