#include<iostream>
using namespace std;
int main() {
int year = 2016;
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
cout<<year<<" is a leap year";
else
cout<<year<<" is not a leap year";
return 0;
}
leapYear = int(input("Input a Year "))
if leapYear %4 == 0:
print("Its a leap year")
else:
print ("Its a normal year")
<?php
$year = 2022;
if($year % 4 == 0) {
echo $year." is a leap year";
}
else {
echo $year." is a not leap year";
}
?>
def is_leap_year(year):
"""This functon returns True if year is a leap year, returns False otherwise"""
if year % 4 == 0:
return True
return False