View Code of Problem 28

#include<iostream>
#include<math.h>
using namespace std;
void isLeep(int x)
{
    if((x%400==0)||(x%100!=0&&x%4==0))
        printf("Leap Year");
    else
        printf("Not Leap Year");
}

int main()
{
    int a;
    while(cin>>a)
    {
       isLeep(a);
       cout<<endl;
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 28