I keep getting this error yet i think i've done per the instructions: If the entered year is not a leap year, you should display: "Number of days in the year: 365"
package com.codegym.task.task04.task0414;
/*
Number of days in the year
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String years = reader.readLine();
int x = Integer.parseInt(years);
if ((x%4==0 && x!=100) || (x%400==0 && x%100==0)){
System.out.println("Number of days in the year: 366" );
}else{
System.out.println("Number of days in the year: 365" );
}
}
}