Assignment 2 - question on string
posted 8 years ago
I noticed in the solution that the string variable indicating whether the number is "even" or "odd" is declared and initialized to "odd". Then if the number is even, the string is changed to "even". Is there a performance or optimization reason for arranging the code like this?