if you take eg as input data 1600 then this is clearly a leap year
now think about what will be the result of your first condition
if (year / 400 == 0)
that's 1600 / 400 == 0 or 4 == 0 -> and that's of course false ==> no leap year
you probably wanted to try the modulo operator...