#include<stdio.h>
typedef struct {
int year;
int month;
int day;
}Date;
Date input_date( Date ymd );
int isLeap( Date days );
int main(void)
{
Date date;
date = input_date( date );
if( isLeap( date ) ){
printf("%d/%d/%d is a leap.\n", date.
year, date.
month, date.
day ); }
return 0;
}
Date input_date( Date ymd )
{
return ymd;
}
int isLeap( Date days )
{
return ( days.year%4 == 0 && days.year%100 != 0 || days.year%400 == 0 );
}
I2luY2x1ZGU8c3RkaW8uaD4KIHR5cGVkZWYgc3RydWN0IHsKICAgIGludCB5ZWFyOwogICAgaW50IG1vbnRoOwogICAgaW50IGRheTsKIH1EYXRlOwogRGF0ZSBpbnB1dF9kYXRlKCBEYXRlIHltZCApOwogaW50IGlzTGVhcCggRGF0ZSBkYXlzICk7CiBpbnQgbWFpbih2b2lkKQogewogICAgRGF0ZSBkYXRlOwogICAgZGF0ZSA9IGlucHV0X2RhdGUoIGRhdGUgKTsKICAgIGlmKCBpc0xlYXAoIGRhdGUgKSApewogICAgICAgIHByaW50ZigiJWQvJWQvJWQgaXMgYSBsZWFwLlxuIiwgZGF0ZS55ZWFyLCBkYXRlLm1vbnRoLCBkYXRlLmRheSApOwogICAgfQogICAgIHJldHVybiAwOwogfQogRGF0ZSBpbnB1dF9kYXRlKCBEYXRlIHltZCApCiB7CiBwcmludGYoInllYXIgIDogXG4iKTsgIHNjYW5mKCIlZCIsICZ5bWQueWVhciAgKTsKIHByaW50ZigibW9udGggOiBcbiIpOyAgc2NhbmYoIiVkIiwgJnltZC5tb250aCApOwogcHJpbnRmKCJkYXkgICA6IFxuIik7ICBzY2FuZigiJWQiLCAmeW1kLmRheSAgICk7CiByZXR1cm4geW1kOwogfQogaW50IGlzTGVhcCggRGF0ZSBkYXlzICkKIHsKIHJldHVybiAoIGRheXMueWVhciU0ID09IDAgJiYgZGF5cy55ZWFyJTEwMCAhPSAwIHx8IGRheXMueWVhciU0MDAgPT0gMCApOwogfQog