Hello, I tried to do a reverse counter (as if it is a bullet counter for a weapon), but I think that in the line 16 I coded something wrong and I can't get it working.
Well, both of those while loops will be infinite if you enter them, since you do nothing to change the condition upon which they loop. What's the desired behavior?
Change the 'while's to 'if's and see how your program behaves.
Line 16,22: Your while loops will do nothing. The ; at the end of the line terminates the loop. Lines 17-20 and 23-26 will be executed unconditionally. Remove the ; after your while condition.