#include <stdio.h> int main() { int year,t; while (scanf("%d",&year)!=EOF) { year%100==0?(year%400==0?printf("leap year\n"):printf("not leap year\n")):(year%4==0?printf("leap year\n"):printf("not leap year\n")); } } |
Double click to view unformatted code.