Some of the code posted here leads to the "hmph, well that sure is a creative way of doing that" reaction. Other code seems to elicit the "my parakeet codes better" response. I didn't quite get either reaction from the Java snippet C.M. sent me. No, after puzzling over what it did for a little bit, I had the classic "you have got to be kidding me, that's it?!?" response. Take a look your self ... I've posted the (one-line) answer in the comments ...
int[] months = new int[24]; int cnt = 7; int i = 0; while (cnt <= 12) { months[i] = cnt; cnt = cnt + 1; i = i + 1; } cnt = 1; while (cnt <= 12) { months[i] = cnt; cnt = cnt + 1; i = i + 1; } cnt = 1; while (cnt <= 6) { months[i] = cnt; cnt = cnt + 1; i = i + 1; }
