an I am repeating this until the number is equal to 0. But when the number is supposed to be equal to 9 the answer given is 90. when it suppose to be 8 it is equal to 80.... and so on .
It looks like something is going on that you do not have posted. Put a break point at this line in your code...
(won-=2);
After that line executes put your cursor over 'won' and see what is actually stored there, is it a 9 or a 90? (or whatever permutation you are looking for). Take it one step at a time.
Also just by your explanation and the code you give as an example, won could never be 9, if you initialize with 18 and subtract 2 each pass. Unless like I said you are giving arbitrary numbers for your example.