关于数组,有个不懂的问题求大神解答
这是原题程序代码:
#include <stdio.h> main() { int n; char monthName[][20] = {Illegal month, January, February, March, April, May, June, July, August, September, October, November, December}; printf("Input month number:"); scanf("%d", n); if ((n < 12) || (n > 1)) { printf("month %d is %c\n", n, monthName[n][n]); } else { printf("%s\n", monthName[0][0]); } }