Dodano zadanie z przestępności

This commit is contained in:
2022-10-12 14:58:28 +02:00
parent 349b467b11
commit 7331158d3a

20
prz.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include <iostream>
int main()
{
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
long rok;
std::string przest;
std::cin >> rok;
if ( rok % 4 == 0 ){
if ( rok % 100 == 0 and rok % 400 != 0 ){
przest = "NIE";
} else {
przest = "TAK";
}
} else {
przest = "NIE";
}
std::cout << przest;
return 0;
}