Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int y[] = { 4,100,400 };
- int n, isL = 0;
- cin >> n;
- for (int i = 0; i < 3; i++) if (n%y[i] == 0) isL++;
- (isL%2==0) ? puts("Not Leap Year") : puts("Leap Year");
- return 0;
- }
Add Comment
Please, Sign In to add comment