Answers for "a year is a leap year if it is divisible by"

6

Check if a year is a leap year

if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
cout<<year<<" is a leap year";
else
cout<<year<<" is not a leap year";
Posted by: Guest on August-21-2021
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

Code answers related to "a year is a leap year if it is divisible by"

Code answers related to "Javascript"

Browse Popular Code Answers by Language