C语言输入月份,输出月份的英文名
#include<stdio.h>int main() {char *month[13] = {"illegal","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" };int n;printf("请输入月份:");scanf_s("%d",&n);if (n <= 12 && n >= 0) {printf("It is %s\n",*(month+n));}else {printf("It is Wrong!\n");}system("pause");return 0;}