编写程序 输入一个整数,输出与该整型数对应的月份的英语名称

2022-08-04 教育 50阅读
printf("情输入一个月份的数字:");
int month;
scanf("%d",month);
switch(month)
{
case 1:
printf("\nJanuary");
break;
case 2:
printf("\nFebruary");
break;
case 3:
printf("\nMarch");
break;
case 4:
printf("\nApril");
break;
case 5:
printf("\nMay");
break;
case 6:
printf("\nJune");
break;
case 7:
printf("\nJuly");
break;
case 8:
printf("\nAugust");
break;
case 9:
printf("\nSeptember");
break;
case 10:
printf("\nOctober");
break;
case 11:
printf("\nNevember");
break;
case 12:
printf("\nDecember");
break;

}
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com