I want to create equation that represents following piece of code (it is much more complicated I simplify it for clearance)
int v = 23; sum = 0; for (int i = v; i > 0; i= i - 2) { sum = sum + i; }
I want to write it like
\sum^{i=i-2;i>0}_{i=v}i
but I have feeling that it might not be the proper way.