Help with leap year program.

I am making a martian leap year program(pointless program for class). This is the given :

1) All odd years are leap years.

2) All years divisible by 8, but not by 32 are leap years. (Thus, 8, 16 and 24 are leap years, but 32 is not. Similarly 40, 48 and 56 are leap years but 64 isn't.)

I made a double if statment but it is not working. When I just had part 2 it worked fine but when I added the odd years it is not working.

Code:

`#include <stdio.h>`

int main() {

int year;

printf("Please enter a martian year\n");

scanf("%d", &year);

/* leap years occur if: years can be divided by 8 evenly and not by 32*/

if (year%8 == 0 && year%32 != 0){

if(year%2 == 1)

printf("\n%d is a leap year", year);

}

else

printf("\n%d is not a leap year", year);

return 0;

}