Hey guys can someone give me a few nudges in the right direction of what im missing with my code here.
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 {
//write your code here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String num = br.readLine();
int year = Integer.parseInt(num);
int x;
if (year % 400 == 0){
x = 366;
System.out.println("Number of days in the year: " + x);
}
else if (year % 4 == 0 && year % 400 == 0 && year % 100 != 0){
x = 366;
System.out.println("Number of days in the year: " + x);
}
else if (year % 100 == 0 && year % 400 == 0){
x = 366;
System.out.println("Number of days in the year: " + x);
}
else if (year % 400 != 0 && year % 100 != 0 && year % 4 != 0){
x = 365;
System.out.println("Number of days in the year: " + x);
}
else
x = 365;
System.out.println("Number of days in the year: " + x);
}
}