Leap year or not

Description:

Write a C++ program to find the year is leap year or not Test Case 1 Input (stdin) 2000 Expected Output The year is leap year Test Case 2 Input (stdin) 2111 Expected Output The year is not leap year

Program :

#include <iostream>

using namespace std;

int main()

{

int yr;

cin>>yr;

if((yr%4==0) && (yr%100!=0))

{

cout<<"The year is leap year";

}

else if((yr%100==0) && (yr%400==0))

{

cout<<"The year is leap year";

}

else if(yr%400==0)

{

cout<<"The year is leap year";

}

else

{

cout<<"The year is not leap year";

}}