Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /////////////////////////////////////////////////
- int main()
- {
- int year = 2000;
- bool isLeapYear = 0;
- if(year%4 == 0)
- {
- // cout << "step_1" << endl;
- if(year%100 == 0)
- {
- if(year%400 == 0)
- {
- isLeapYear = true;
- cout << "True" << endl;
- return 0;
- }
- isLeapYear = 0;
- cout << "False" << endl;
- return 0;
- }
- isLeapYear = 1;
- cout << "True" << endl;
- return 0;
- }
- isLeapYear = 0;
- cout << "False" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement