Skip to content

Commit

Permalink
Merge pull request dixitt5#162 from aashishjakhar9099/main
Browse files Browse the repository at this point in the history
Create Leap Year.cpp
  • Loading branch information
dixitt5 authored Oct 22, 2022
2 parents 6ff3c14 + fc2b113 commit b6d6ace
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions C++/Leap Year.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<iostream>
using namespace std;
int main()
{
int yr;
cout<<"Enter the Year: ";
cin>>yr;
if((yr%4==0) && (yr%100!=0))
cout<<"\nIt is a Leap Year";
else if(yr%400==0)
cout<<"\nIt is a Leap Year";
else
cout<<"\nIt is not a Leap Year";
cout<<endl;
return 0;
}

0 comments on commit b6d6ace

Please sign in to comment.