Is leap year? How to code!

Pseudocode

if (year is not divisible by 4) then 
    (it is a common year)
else if (year is not divisible by 100) then
    (it is a leap year)
else if (year is not divisible by 400) then 
    (it is a common year)
else 
    (it is a leap year)
                    

JavaScript Code

var year = 2020;

/* if year is divisible by 4
and is not divisible by 100
or year is divisible by 400
then is leap year */

if((year%4==0 && year%100!=0) || year%400==0)
{
    document.write(year + " is a leap year!");
}
                    

Java Code

int year = 2020;

/* if year is divisible by 4
and is not divisible by 100
or year is divisible by 400
then is leap year */

if((year%4==0 && year%100!=0) || year%400==0)
{
    System.out.println(year + 
    " is a leap year!");
}
                    

C Code

#include<stdio.h>
main()
{
    int year = 2020;

    if((year%4==0 && year%100!=0) || year%400==0)
        printf("%d is a leap year", year);
    else
        printf("%d is not a leap year", year);
    
    return 0;
}
                    

PHP Code

<?php
$year = 2020;

if(($year%4==0 && $year%100!=0) || $year%400==0)
{
    echo "$year is a leap year";
}
else
{
    echo "$year is not a leap year";
}
?>
                    

Python Code

year = 2020;

if ((year%4==0 and year%100!=0) or year%400==0):
    print year , 'is a leap year'
else:
    print year , 'is not a leap year'