mirror of
https://github.com/tiennm99/CTDL-GT.git
synced 2026-06-09 12:14:02 +00:00
Init
This commit is contained in:
+27
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user