View Code of Problem 28

#include<bits/stdc++.h>
using namespace std;
bool change(int);
int main(){
	int year;
	cin>>year;
	if(change(year))cout<<"Leap Year";
	else cout<<"Not Leap Year";
	return 0;
}
bool change(int year){
	return (year%400 == 0)|| (year%4==0&&year%100!=0);
}

Double click to view unformatted code.


Back to problem 28