By the way, "x += x++". Wha?
I've been programming C-like languages, such as
Java, for 10 years and I'm not confident what "x += x++" actually does, without spending 10 minutes consulting documentation.
Perhaps this is part of some homework or assignment, where you have to understand what a weird statement like that does.
If not, then that is the type of weirdness that
you should avoid like the plague in your programming. Rewrite the expression more clearly, perhaps even using two statements, if that makes it clearer.