代码:
#includeint main(){ char *month[12]={"January","February","March","April","May" ,"June", "July" ,"August","September" ,"October","November","December"}; int n; printf("input month:n"); scanf("%d",&n); if ((n<=12)&&(n>=1)) printf("It is %s. n", *(month+n-1)); else printf("It is wrong. n"); return 0; }
运行结果:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)