#include <stdio.h> int main() { int k; while(scanf("%d",&k) != EOF){ if((k % 4 == 0&&k % 100 != 0)||k % 400 == 0){ printf("Leap Year\n"); } else{ printf("Not Leap Year\n"); } } return 0; }
Double click to view unformatted code.