/* Print the number of days in a non-leap year. */ #include main() { int a[12] = { 31, /* January */ 28, /* February */ 31, /* March */ 30, /* April */ 31, /* May */ 30, /* June */ 31, /* July */ 31, /* August */ 30, /* September */ 31, /* October */ 30, /* November */ 31, /* December */ /* Trailing comma optional: KR p. 218-219. */ }; int i; int sum = 0; for (i = 0; i < 12; i = i + 1) { sum = sum + a[i]; } printf("%d\n", sum); }