Find the best solutions to your questions at Westonci.ca, the premier Q&A platform with a community of knowledgeable experts. Explore thousands of questions and answers from knowledgeable experts in various fields on our Q&A platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

plzz help me plzzz help me
its very important​


plzzz..........

Plzz Help Me Plzzz Help Me Its Very Important Plzzz class=

Sagot :

tonb

Answer:

import java.util.Scanner;

public class Main {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   while (true) {

     System.out.print("Enter a year (0 to exit): ");

     int year = scan.nextInt();

     if (year == 0) break;

     boolean leap = false;

     if (year % 4 == 0) {

       if (year % 100 == 0) {

         leap = (year % 400 == 0);

       }

       else {

         leap = true;

       }      

     }

     System.out.printf("%d is%s a leap year.\n", year, leap ? "":" not");

   }

 }

}