Answers for "how to know if its a leap year"

2

find leap year

function leapYear(year)
{
  return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
}
Posted by: Guest on April-20-2022
1

how can you know if a year is a leap year

leapYear = int(input("Input a Year "))

if leapYear %4 == 0:
    print("Its a leap year")
else:
    print ("Its a normal year")
Posted by: Guest on January-19-2022
0

Code to check Check whether a year is leap year or not

<?php
    $year = 2022;
    if($year % 4 == 0) {
      echo $year." is a leap year";
    }
    else {
      echo $year." is a not leap year";
    }
  ?>
Posted by: Guest on April-10-2022

Code answers related to "how to know if its a leap year"

Code answers related to "Javascript"

Browse Popular Code Answers by Language