#include<iostream> using namespace std; int main() { int Y; while(cin>>Y) { if(Y%4==0&&Y%100!=0||Y%400==0) cout<<"Leap Year"<<endl; else cout<<"Not Leap Year"<<endl; } return 0; }
Double click to view unformatted code.