This commit is contained in:
tienthieusac
2018-10-03 20:45:35 +07:00
committed by Minh Tien Nguyen
commit b0111fce8a
25 changed files with 2196 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#include <iostream>
using namespace std;
bool isLeapYear(int n)
{
if ((n % 4 == 0 && n % 100 != 0) || n % 400 == 0)
{
return true;
}
return false;
}
int main()
{
int n;
cout << "Nhap so nam:" << endl;
cin >> n;
if (isLeapYear(n))
{
cout << "YES";
}
else
{
cout << "NO";
}
cout << endl;
system("pause");
return 0;
}