how do i write java program using for loop that decreases by 1 and when it reaches 0, it increases to a certain number.

it has to be under one loop.