Why a++ is not working?
I don't know how much this will help you, Yroslav, but let's go. When you do ++a, the value first increases to 401 and then it's attributed to c. Using a++, the value of 400 is attributed to c first and then increased to 401, so c does not get the increment, only a. If you wrote System.out.print(a) instead, both a++ and ++a would give you the same result.
Daniel Rosa is right. Miss doing Java challenges with you Daniel.
https://code.sololearn.com/c0K15wF6EtlB/?ref=app There's the solution☺️😉