diff --git a/Leap year b/Leap year new file mode 100644 index 0000000..6a2f53c --- /dev/null +++ b/Leap year @@ -0,0 +1,45 @@ +#include + +using namespace std; + +int main() + +{ + + int year; + + cout << "Enter a year: "; + + cin >> year; + + if (year % 4 == 0) + + { + + if (year % 100 == 0) + + { + + if (year % 400 == 0) + + cout << year << " is a leap year."; + + else + + cout << year << " is not a leap year."; + + } + + else + + cout << year << " is a leap year."; + + } + + else + + cout << year << " is not a leap year."; + + return 0; + +}