Question, why is none of the math processes in this code being executed?

weew
Last edited on
They are. They're just not doing what you expect.

== is comparison, not assignment. = is assignment (and -= and += etc)

So for 0:

 
xValue = xValue + 3;


or

 
xValue += 3;


For 1:

 
yValue = yValue - xValue;


or

 
yValue -= xValue;


and similar for the others.
Also keep in mind that the variable to which you assign must be on the left side of expression.

You code:
xValue * yValue==result;

Should be rewritten such that result is on the left side:
result = xValue * yValue;
silver20, DON'T EDIT YOUR POST to remove your question. That is rude and trollish.
Topic archived. No new replies allowed.