Henry Wong wrote:
And BTW, here is the solution in Java...
For C/C++, I would try to do something similar with the C preprocessor.
Henry
You are using the Unicode for semi-colon here, but the requirement was to avoid the use of a semi-colon at all . Still I like your approach !
Myke wrote:
This is how you do it in Java
Great approach Mike

.
The solution in C is similar to this one, i.e to wrap the console writer within an if statement and an empty if block ! And truly your code is without any semi-colon at all ! Great !