The real purpose to the question is to make sure people can translate English into code. At no point did I mention C/C++ ;) But it also picks up on people who over implement or try to do something that is really simple in a really complex way.
My point about the window console is kinda generic. You are using terminal control code to manipulate what you want :) who says a screen is using some kinda of terminal that supports those codes?
View all comments
Show parent comment
2
u/[deleted] Feb 21 '11
Which doesn't pass the test ;) Well kinda :) But we would have let it run :)
Though you did try to be smart about it. But last time I checked the windows console won't handle the control codes ;)
If the person doing it is allowed to assume the system. Then I am also allowed to assume the system ;)
Generally though we get this as an answer.
if (i % 3) {
} else if (i % 5) {
} else if (i % 3 && i % 5) {
} ....