31 Java Programs Leap Year |

preview_player
Показать описание
"Learn How To Design + Code A Complete App From Scratch To Playstore"
-~-~~-~~~-~~-~-

This Java tutorial video shows a simple Java program to determine whether a year entered by user is leap year or not using modulus operator

Join us on Facebook at
Follow us on Twitter at
Рекомендации по теме
Комментарии
Автор

Can you make a exemple using for rather import??? thank you so much

niel
Автор

if ( ( year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 )
     System.out.println(" leap year ");
else
   System.out.println(" not leap year ");

TheVaskrsija
Автор

if (years % 100 == 0 || years % 4 == 0) {


} else {
System.out.println("not a leap");
}

push
Автор

if((year%4==0) && (year%100 != 0) || (year%400 == 0)
System.out.println("Lets dance it's leap year");
else
System.out.println("Sorry it's not a leap year");

rupeshpandey