main.cs171 chars7 lines
Explanation:
n
to the upper limit of the range of odd numbers to be considered.sum
to 0 before starting the loop.i
to 1, and advances by 2 at each step to consider only the odd numbers within the range of 1 to n
.sum
.sum
which contains the sum of the squares of odd numbers.gistlibby LogSnag