View Code of Problem 28

#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
#include <stack>
#include <map>
#include <set>
#include <queue>
using namespace std;



int main()
{
    #ifdef  ONLINE_JUDGE
    #else
    freopen("1.txt","r",stdin);
    #endif
    int a;
    while(cin>>a)
    {
        if((a%4==0&&a%100!=0)||a%400==0)
            cout<<"Leap Year"<<endl;
        else cout<<"Not Leap Year"<<endl;
    }



    return 0;
}

Double click to view unformatted code.


Back to problem 28