Hi!
I ran through all the test cases and there were no errors. However, I could not pass the testing, 2 conditions were still not met. I even tried on IntelliJ IDEA but still could not pass testing.
Can anyone spot the error in my code? Thank you!
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));
int year = Integer.parseInt(reader.readLine());
String leap = "Number of days in the year: 366";
String regular = "Number of days in the year: 365";
if (year%400 == 0)
System.out.println(leap);
else
if (year%100 == 0)
System.out.println(regular);
else
if (year%4 == 0)
System.out.println(leap);
}
}