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