我不知道我的程序有什么问题。每当我尝试输出时,它只打印It is the season of Winter
,我不知道如何解决这个问题。
int main() {
int answer = 1;
int mon;
do {
printf("Input a month : ");
scanf("%d", &mon);
if (mon == 1 || 2 || 12)
printf("It is the season of winter\n\n\n");
if (mon == 3 || 4 || 5)
printf("It is the season of spring\n\n\n");
if (mon == 6 || 7 || 8)
printf("It is the season of summer\n\n\n");
if (mon == 9 || 10 || 11)
printf("It is the season of fall\n\n\n");
printf("Would you like to try again? (1= YES / 0= NO) : ");
scanf("%d", &answer);
} while (answer !=0);
printf("\n\n\n");
}