Java program - Determines Whether a Year a Leap Year Or Not

preview_player
Показать описание
Java program that tells if a year is a leap year or not

public class TestApp {


public static void main(String[] args)
{
int year;

if (year%4 == 0)
{
}
else
{
}
}
}

#codingriver
#javaprogramsexamples
#javaprogrammingbasics
Рекомендации по теме
Комментарии
Автор

if you input 1700 your output will be its a leap year which is incorrect

donjoseph