Java Master Crux Course

Screenshot (31)
Why is the output not showing correctly when I am entering even number values like 6, 8, 10, etc.? Or this code does not work for even numbers?