Skip to content

Instantly share code, notes, and snippets.

@eimon96
Created April 18, 2022 13:16
Show Gist options
  • Save eimon96/e74b3d6852ad33342974e9165946410c to your computer and use it in GitHub Desktop.
Save eimon96/e74b3d6852ad33342974e9165946410c to your computer and use it in GitHub Desktop.
2020
#include <iostream>
using namespace std;
int handleExit();
int main()
{
int year;
cout << "Hellooo! Lets do this...\nYear:";
cin >> year;
if (year%4 == 0 && year%100 != 0)
{
cout << "Leap Year!";
}
else if (year%400==0)
{
cout << "Leap Year!";
}
else
{
cout << "Just a Common Year";
};
cout << "\nHappy 29/2/20 xDD";
handleExit();
};
int handleExit()
{
cout << "\nPress enter to exit.";
cin.get();
if (cin.get() == '\n')
{
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment