Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / pract. 02 / task1.cpp
blob: 3a60fad4b8f18aed4431a0f98f3addedbcecb74e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<iostream>
using namespace std;
int main()
{
	 int year;

	 cout << "Enter an year to check: ";
	 cin >> year;

	 cout << year << " is";

	 if (!(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)))
	 {
		  cout << " not";
	 }

	 cout << " leap!\n";

	 return 0;
}