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