package com.codegym.task.task04.task0414; /* divisible by 400 = leap divisible by 4 = leap divisible by 100 = regular */ import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { Scanner kb = new Scanner(System.in); System.out.println("Enter year"); int year = kb.nextInt(); if(year% 400 ==0 ||year%4 == 0 && year%100!=0){ int x = 366; System.out.println("Number of days in the year: "+ x); } else{ int x = 365; System.out.println("Number of days in the year: "+x); } } }