if statements

This is for a program I have to do to calculate the day of the week.
I need to write an if statement that will do the following:

if day is 29 and year is odd, don't calculate day
if ( day == 29 && year == ??? )

I know how to do it for the day but I don't know how to do it for the year.

What language are you writing this programme in?

In C.

This should do it:

if ( day == 29 && year % 2 )

year % 2 is 0 (i.e. false) if the year is even, and 1 (i.e. true, as is any non-zero value in C) if the year is odd. % is the "modulus" or "remainder" operator.

Oh. That makes sense.

Thank you!